home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / winuser.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  188.6 KB  |  8,699 lines

  1. /****************************************************************************
  2. *                                                                           *
  3. * winuser.h -- USER procedure declarations, constant definitions and macros *
  4. *                                                                           *
  5. * Copyright (c) 1985-1996, Microsoft Corp. All rights reserved.             *
  6. *                                                                           *
  7. ****************************************************************************/
  8.  
  9.  
  10. #ifndef _WINUSER_
  11. #define _WINUSER_
  12. #pragma option push -b
  13.  
  14. //
  15. // Define API decoration for direct importing of DLL references.
  16. //
  17.  
  18. #if !defined(_USER32_)
  19. #define WINUSERAPI DECLSPEC_IMPORT
  20. #else
  21. #define WINUSERAPI
  22. #endif
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif /* __cplusplus */
  27.  
  28.  
  29. #ifndef WINVER
  30. #define WINVER  0x0400      /* version 4.0 */
  31. #endif /* !WINVER */
  32.  
  33. #include <stdarg.h>
  34.  
  35. #ifndef NOUSER
  36.  
  37. typedef HANDLE HDWP;
  38. typedef VOID MENUTEMPLATEA;
  39. typedef VOID MENUTEMPLATEW;
  40. #ifdef UNICODE
  41. typedef MENUTEMPLATEW MENUTEMPLATE;
  42. #else
  43. typedef MENUTEMPLATEA MENUTEMPLATE;
  44. #endif // UNICODE
  45. typedef PVOID LPMENUTEMPLATEA;
  46. typedef PVOID LPMENUTEMPLATEW;
  47. #ifdef UNICODE
  48. typedef LPMENUTEMPLATEW LPMENUTEMPLATE;
  49. #else
  50. typedef LPMENUTEMPLATEA LPMENUTEMPLATE;
  51. #endif // UNICODE
  52.  
  53. typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  54.  
  55. #ifdef STRICT
  56.  
  57. typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
  58. typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD);
  59. typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int);
  60. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  61. typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
  62. typedef VOID (CALLBACK* SENDASYNCPROC)(HWND, UINT, DWORD, LRESULT);
  63.  
  64. typedef BOOL (CALLBACK* PROPENUMPROCA)(HWND, LPCSTR, HANDLE);
  65. typedef BOOL (CALLBACK* PROPENUMPROCW)(HWND, LPCWSTR, HANDLE);
  66.  
  67. typedef BOOL (CALLBACK* PROPENUMPROCEXA)(HWND, LPSTR, HANDLE, DWORD);
  68. typedef BOOL (CALLBACK* PROPENUMPROCEXW)(HWND, LPWSTR, HANDLE, DWORD);
  69.  
  70. typedef int (CALLBACK* EDITWORDBREAKPROCA)(LPSTR lpch, int ichCurrent, int cch, int code);
  71. typedef int (CALLBACK* EDITWORDBREAKPROCW)(LPWSTR lpch, int ichCurrent, int cch, int code);
  72.  
  73. #if(WINVER >= 0x0400)
  74. typedef BOOL (CALLBACK* DRAWSTATEPROC)(HDC hdc, LPARAM lData, WPARAM wData, int cx, int cy);
  75. #endif /* WINVER >= 0x0400 */
  76. #else /* !STRICT */
  77.  
  78. typedef FARPROC DLGPROC;
  79. typedef FARPROC TIMERPROC;
  80. typedef FARPROC GRAYSTRINGPROC;
  81. typedef FARPROC WNDENUMPROC;
  82. typedef FARPROC HOOKPROC;
  83. typedef FARPROC SENDASYNCPROC;
  84.  
  85. typedef FARPROC EDITWORDBREAKPROCA;
  86. typedef FARPROC EDITWORDBREAKPROCW;
  87.  
  88. typedef FARPROC PROPENUMPROCA;
  89. typedef FARPROC PROPENUMPROCW;
  90.  
  91. typedef FARPROC PROPENUMPROCEXA;
  92. typedef FARPROC PROPENUMPROCEXW;
  93.  
  94. #if(WINVER >= 0x0400)
  95. typedef FARPROC DRAWSTATEPROC;
  96. #endif /* WINVER >= 0x0400 */
  97. #endif /* !STRICT */
  98.  
  99. #ifdef UNICODE
  100. typedef PROPENUMPROCW        PROPENUMPROC;
  101. typedef PROPENUMPROCEXW      PROPENUMPROCEX;
  102. typedef EDITWORDBREAKPROCW   EDITWORDBREAKPROC;
  103. #else  /* !UNICODE */
  104. typedef PROPENUMPROCA        PROPENUMPROC;
  105. typedef PROPENUMPROCEXA      PROPENUMPROCEX;
  106. typedef EDITWORDBREAKPROCA   EDITWORDBREAKPROC;
  107. #endif /* UNICODE */
  108.  
  109. #ifdef STRICT
  110.  
  111. typedef BOOL (CALLBACK* NAMEENUMPROCA)(LPSTR, LPARAM);
  112. typedef BOOL (CALLBACK* NAMEENUMPROCW)(LPWSTR, LPARAM);
  113.  
  114. typedef NAMEENUMPROCA   WINSTAENUMPROCA;
  115. typedef NAMEENUMPROCA   DESKTOPENUMPROCA;
  116. typedef NAMEENUMPROCW   WINSTAENUMPROCW;
  117. typedef NAMEENUMPROCW   DESKTOPENUMPROCW;
  118.  
  119. #else /* !STRICT */
  120.  
  121. typedef FARPROC NAMEENUMPROCA;
  122. typedef FARPROC NAMEENUMPROCW;
  123. typedef FARPROC WINSTAENUMPROCA;
  124. typedef FARPROC DESKTOPENUMPROCA;
  125. typedef FARPROC WINSTAENUMPROCW;
  126. typedef FARPROC DESKTOPENUMPROCW;
  127.  
  128. #endif /* !STRICT */
  129.  
  130. #ifdef UNICODE
  131. typedef WINSTAENUMPROCW     WINSTAENUMPROC;
  132. typedef DESKTOPENUMPROCW    DESKTOPENUMPROC;
  133. #else  /* !UNICODE */
  134. typedef WINSTAENUMPROCA     WINSTAENUMPROC;
  135. typedef DESKTOPENUMPROCA    DESKTOPENUMPROC;
  136. #endif /* UNICODE */
  137.  
  138. #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
  139. #define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
  140. #ifdef UNICODE
  141. #define MAKEINTRESOURCE  MAKEINTRESOURCEW
  142. #else
  143. #define MAKEINTRESOURCE  MAKEINTRESOURCEA
  144. #endif // !UNICODE
  145.  
  146. #ifndef NORESOURCE
  147.  
  148. /*
  149.  * Predefined Resource Types
  150.  */
  151. #define RT_CURSOR           MAKEINTRESOURCE(1)
  152. #define RT_BITMAP           MAKEINTRESOURCE(2)
  153. #define RT_ICON             MAKEINTRESOURCE(3)
  154. #define RT_MENU             MAKEINTRESOURCE(4)
  155. #define RT_DIALOG           MAKEINTRESOURCE(5)
  156. #define RT_STRING           MAKEINTRESOURCE(6)
  157. #define RT_FONTDIR          MAKEINTRESOURCE(7)
  158. #define RT_FONT             MAKEINTRESOURCE(8)
  159. #define RT_ACCELERATOR      MAKEINTRESOURCE(9)
  160. #define RT_RCDATA           MAKEINTRESOURCE(10)
  161. #define RT_MESSAGETABLE     MAKEINTRESOURCE(11)
  162.  
  163. #define DIFFERENCE          11
  164. #define RT_GROUP_CURSOR MAKEINTRESOURCE((DWORD)RT_CURSOR + DIFFERENCE)
  165. #define RT_GROUP_ICON   MAKEINTRESOURCE((DWORD)RT_ICON + DIFFERENCE)
  166. #define RT_VERSION      MAKEINTRESOURCE(16)
  167. #define RT_DLGINCLUDE   MAKEINTRESOURCE(17)
  168. #if(WINVER >= 0x0400)
  169. #define RT_PLUGPLAY     MAKEINTRESOURCE(19)
  170. #define RT_VXD          MAKEINTRESOURCE(20)
  171. #define RT_ANICURSOR    MAKEINTRESOURCE(21)
  172. #define RT_ANIICON      MAKEINTRESOURCE(22)
  173. #endif /* WINVER >= 0x0400 */
  174.  
  175. #endif /* !NORESOURCE */
  176.  
  177. WINUSERAPI
  178. int
  179. WINAPI
  180. wvsprintfA(
  181.     LPSTR,
  182.     LPCSTR,
  183.     va_list arglist);
  184. WINUSERAPI
  185. int
  186. WINAPI
  187. wvsprintfW(
  188.     LPWSTR,
  189.     LPCWSTR,
  190.     va_list arglist);
  191. #ifdef UNICODE
  192. #define wvsprintf  wvsprintfW
  193. #else
  194. #define wvsprintf  wvsprintfA
  195. #endif // !UNICODE
  196.  
  197. WINUSERAPI int WINAPIV wsprintfA(LPSTR, LPCSTR, ...);
  198. WINUSERAPI int WINAPIV wsprintfW(LPWSTR, LPCWSTR, ...);
  199. #ifdef UNICODE
  200. #define wsprintf  wsprintfW
  201. #else
  202. #define wsprintf  wsprintfA
  203. #endif // !UNICODE
  204.  
  205. #ifndef NOSCROLL
  206.  
  207. /*
  208.  * Scroll Bar Constants
  209.  */
  210. #define SB_HORZ             0
  211. #define SB_VERT             1
  212. #define SB_CTL              2
  213. #define SB_BOTH             3
  214.  
  215. /*
  216.  * Scroll Bar Commands
  217.  */
  218. #define SB_LINEUP           0
  219. #define SB_LINELEFT         0
  220. #define SB_LINEDOWN         1
  221. #define SB_LINERIGHT        1
  222. #define SB_PAGEUP           2
  223. #define SB_PAGELEFT         2
  224. #define SB_PAGEDOWN         3
  225. #define SB_PAGERIGHT        3
  226. #define SB_THUMBPOSITION    4
  227. #define SB_THUMBTRACK       5
  228. #define SB_TOP              6
  229. #define SB_LEFT             6
  230. #define SB_BOTTOM           7
  231. #define SB_RIGHT            7
  232. #define SB_ENDSCROLL        8
  233.  
  234. #endif /* !NOSCROLL */
  235.  
  236. #ifndef NOSHOWWINDOW
  237.  
  238. // begin_r_winuser
  239.  
  240. /*
  241.  * ShowWindow() Commands
  242.  */
  243. #define SW_HIDE             0
  244. #define SW_SHOWNORMAL       1
  245. #define SW_NORMAL           1
  246. #define SW_SHOWMINIMIZED    2
  247. #define SW_SHOWMAXIMIZED    3
  248. #define SW_MAXIMIZE         3
  249. #define SW_SHOWNOACTIVATE   4
  250. #define SW_SHOW             5
  251. #define SW_MINIMIZE         6
  252. #define SW_SHOWMINNOACTIVE  7
  253. #define SW_SHOWNA           8
  254. #define SW_RESTORE          9
  255. #define SW_SHOWDEFAULT      10
  256. #define SW_MAX              10
  257.  
  258. /*
  259.  * Old ShowWindow() Commands
  260.  */
  261. #define HIDE_WINDOW         0
  262. #define SHOW_OPENWINDOW     1
  263. #define SHOW_ICONWINDOW     2
  264. #define SHOW_FULLSCREEN     3
  265. #define SHOW_OPENNOACTIVATE 4
  266.  
  267. /*
  268.  * Identifiers for the WM_SHOWWINDOW message
  269.  */
  270. #define SW_PARENTCLOSING    1
  271. #define SW_OTHERZOOM        2
  272. #define SW_PARENTOPENING    3
  273. #define SW_OTHERUNZOOM      4
  274.  
  275. // end_r_winuser
  276.  
  277. #endif /* !NOSHOWWINDOW */
  278.  
  279. /*
  280.  * WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
  281.  */
  282. #define KF_EXTENDED         0x0100
  283. #define KF_DLGMODE          0x0800
  284. #define KF_MENUMODE         0x1000
  285. #define KF_ALTDOWN          0x2000
  286. #define KF_REPEAT           0x4000
  287. #define KF_UP               0x8000
  288.  
  289. #ifndef NOVIRTUALKEYCODES
  290.  
  291. // begin_r_winuser
  292.  
  293. /*
  294.  * Virtual Keys, Standard Set
  295.  */
  296. #define VK_LBUTTON        0x01
  297. #define VK_RBUTTON        0x02
  298. #define VK_CANCEL         0x03
  299. #define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
  300.  
  301. #define VK_BACK           0x08
  302. #define VK_TAB            0x09
  303.  
  304. #define VK_CLEAR          0x0C
  305. #define VK_RETURN         0x0D
  306.  
  307. #define VK_SHIFT          0x10
  308. #define VK_CONTROL        0x11
  309. #define VK_MENU           0x12
  310. #define VK_PAUSE          0x13
  311. #define VK_CAPITAL        0x14
  312.  
  313. #define VK_KANA           0x15
  314. #define VK_HANGEUL        0x15  /* old name - should be here for compatibility */
  315. #define VK_HANGUL         0x15
  316. #define VK_JUNJA          0x17
  317. #define VK_FINAL          0x18
  318. #define VK_HANJA          0x19
  319. #define VK_KANJI          0x19
  320.  
  321. #define VK_ESCAPE         0x1B
  322.  
  323. #define VK_CONVERT        0x1C
  324. #define VK_NONCONVERT     0x1D
  325. #define VK_ACCEPT         0x1E
  326. #define VK_MODECHANGE     0x1F
  327.  
  328. #define VK_SPACE          0x20
  329. #define VK_PRIOR          0x21
  330. #define VK_NEXT           0x22
  331. #define VK_END            0x23
  332. #define VK_HOME           0x24
  333. #define VK_LEFT           0x25
  334. #define VK_UP             0x26
  335. #define VK_RIGHT          0x27
  336. #define VK_DOWN           0x28
  337. #define VK_SELECT         0x29
  338. #define VK_PRINT          0x2A
  339. #define VK_EXECUTE        0x2B
  340. #define VK_SNAPSHOT       0x2C
  341. #define VK_INSERT         0x2D
  342. #define VK_DELETE         0x2E
  343. #define VK_HELP           0x2F
  344.  
  345. /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
  346. /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
  347.  
  348. #define VK_LWIN           0x5B
  349. #define VK_RWIN           0x5C
  350. #define VK_APPS           0x5D
  351.  
  352. #define VK_NUMPAD0        0x60
  353. #define VK_NUMPAD1        0x61
  354. #define VK_NUMPAD2        0x62
  355. #define VK_NUMPAD3        0x63
  356. #define VK_NUMPAD4        0x64
  357. #define VK_NUMPAD5        0x65
  358. #define VK_NUMPAD6        0x66
  359. #define VK_NUMPAD7        0x67
  360. #define VK_NUMPAD8        0x68
  361. #define VK_NUMPAD9        0x69
  362. #define VK_MULTIPLY       0x6A
  363. #define VK_ADD            0x6B
  364. #define VK_SEPARATOR      0x6C
  365. #define VK_SUBTRACT       0x6D
  366. #define VK_DECIMAL        0x6E
  367. #define VK_DIVIDE         0x6F
  368. #define VK_F1             0x70
  369. #define VK_F2             0x71
  370. #define VK_F3             0x72
  371. #define VK_F4             0x73
  372. #define VK_F5             0x74
  373. #define VK_F6             0x75
  374. #define VK_F7             0x76
  375. #define VK_F8             0x77
  376. #define VK_F9             0x78
  377. #define VK_F10            0x79
  378. #define VK_F11            0x7A
  379. #define VK_F12            0x7B
  380. #define VK_F13            0x7C
  381. #define VK_F14            0x7D
  382. #define VK_F15            0x7E
  383. #define VK_F16            0x7F
  384. #define VK_F17            0x80
  385. #define VK_F18            0x81
  386. #define VK_F19            0x82
  387. #define VK_F20            0x83
  388. #define VK_F21            0x84
  389. #define VK_F22            0x85
  390. #define VK_F23            0x86
  391. #define VK_F24            0x87
  392.  
  393. #define VK_NUMLOCK        0x90
  394. #define VK_SCROLL         0x91
  395.  
  396. /*
  397.  * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  398.  * Used only as parameters to GetAsyncKeyState() and GetKeyState().
  399.  * No other API or message will distinguish left and right keys in this way.
  400.  */
  401. #define VK_LSHIFT         0xA0
  402. #define VK_RSHIFT         0xA1
  403. #define VK_LCONTROL       0xA2
  404. #define VK_RCONTROL       0xA3
  405. #define VK_LMENU          0xA4
  406. #define VK_RMENU          0xA5
  407.  
  408. #if(WINVER >= 0x0400)
  409. #define VK_PROCESSKEY     0xE5
  410. #endif /* WINVER >= 0x0400 */
  411.  
  412. #define VK_ATTN           0xF6
  413. #define VK_CRSEL          0xF7
  414. #define VK_EXSEL          0xF8
  415. #define VK_EREOF          0xF9
  416. #define VK_PLAY           0xFA
  417. #define VK_ZOOM           0xFB
  418. #define VK_NONAME         0xFC
  419. #define VK_PA1            0xFD
  420. #define VK_OEM_CLEAR      0xFE
  421.  
  422. // end_r_winuser
  423.  
  424. #endif /* !NOVIRTUALKEYCODES */
  425.  
  426. #ifndef NOWH
  427.  
  428. /*
  429.  * SetWindowsHook() codes
  430.  */
  431. #define WH_MIN              (-1)
  432. #define WH_MSGFILTER        (-1)
  433. #define WH_JOURNALRECORD    0
  434. #define WH_JOURNALPLAYBACK  1
  435. #define WH_KEYBOARD         2
  436. #define WH_GETMESSAGE       3
  437. #define WH_CALLWNDPROC      4
  438. #define WH_CBT              5
  439. #define WH_SYSMSGFILTER     6
  440. #define WH_MOUSE            7
  441. #define WH_HARDWARE         8
  442. #define WH_DEBUG            9
  443. #define WH_SHELL           10
  444. #define WH_FOREGROUNDIDLE  11
  445. #if(WINVER >= 0x0400)
  446. #define WH_CALLWNDPROCRET  12
  447. #endif /* WINVER >= 0x0400 */
  448. #if(WINVER >= 0x0400)
  449. #define WH_MAX             12
  450. #else
  451. #define WH_MAX             11
  452. #endif
  453. #define WH_MINHOOK         WH_MIN
  454. #define WH_MAXHOOK         WH_MAX
  455.  
  456. /*
  457.  * Hook Codes
  458.  */
  459. #define HC_ACTION           0
  460. #define HC_GETNEXT          1
  461. #define HC_SKIP             2
  462. #define HC_NOREMOVE         3
  463. #define HC_NOREM            HC_NOREMOVE
  464. #define HC_SYSMODALON       4
  465. #define HC_SYSMODALOFF      5
  466.  
  467. /*
  468.  * CBT Hook Codes
  469.  */
  470. #define HCBT_MOVESIZE       0
  471. #define HCBT_MINMAX         1
  472. #define HCBT_QS             2
  473. #define HCBT_CREATEWND      3
  474. #define HCBT_DESTROYWND     4
  475. #define HCBT_ACTIVATE       5
  476. #define HCBT_CLICKSKIPPED   6
  477. #define HCBT_KEYSKIPPED     7
  478. #define HCBT_SYSCOMMAND     8
  479. #define HCBT_SETFOCUS       9
  480.  
  481. /*
  482.  * HCBT_CREATEWND parameters pointed to by lParam
  483.  */
  484. typedef struct tagCBT_CREATEWNDA
  485. {
  486.     struct tagCREATESTRUCTA *lpcs;
  487.     HWND           hwndInsertAfter;
  488. } CBT_CREATEWNDA, *LPCBT_CREATEWNDA;
  489. /*
  490.  * HCBT_CREATEWND parameters pointed to by lParam
  491.  */
  492. typedef struct tagCBT_CREATEWNDW
  493. {
  494.     struct tagCREATESTRUCTW *lpcs;
  495.     HWND           hwndInsertAfter;
  496. } CBT_CREATEWNDW, *LPCBT_CREATEWNDW;
  497. #ifdef UNICODE
  498. typedef CBT_CREATEWNDW CBT_CREATEWND;
  499. typedef LPCBT_CREATEWNDW LPCBT_CREATEWND;
  500. #else
  501. typedef CBT_CREATEWNDA CBT_CREATEWND;
  502. typedef LPCBT_CREATEWNDA LPCBT_CREATEWND;
  503. #endif // UNICODE
  504.  
  505. /*
  506.  * HCBT_ACTIVATE structure pointed to by lParam
  507.  */
  508. typedef struct tagCBTACTIVATESTRUCT
  509. {
  510.     BOOL    fMouse;
  511.     HWND    hWndActive;
  512. } CBTACTIVATESTRUCT, *LPCBTACTIVATESTRUCT;
  513.  
  514. /*
  515.  * WH_MSGFILTER Filter Proc Codes
  516.  */
  517. #define MSGF_DIALOGBOX      0
  518. #define MSGF_MESSAGEBOX     1
  519. #define MSGF_MENU           2
  520. #define MSGF_MOVE           3
  521. #define MSGF_SIZE           4
  522. #define MSGF_SCROLLBAR      5
  523. #define MSGF_NEXTWINDOW     6
  524. #define MSGF_MAINLOOP       8
  525. #define MSGF_MAX            8
  526. #define MSGF_USER           4096
  527.  
  528. /*
  529.  * Shell support
  530.  */
  531. #define HSHELL_WINDOWCREATED        1
  532. #define HSHELL_WINDOWDESTROYED      2
  533. #define HSHELL_ACTIVATESHELLWINDOW  3
  534.  
  535. #if(WINVER >= 0x0400)
  536. #define HSHELL_WINDOWACTIVATED      4
  537. #define HSHELL_GETMINRECT           5
  538. #define HSHELL_REDRAW               6
  539. #define HSHELL_TASKMAN              7
  540. #define HSHELL_LANGUAGE             8
  541. #endif /* WINVER >= 0x0400 */
  542.  
  543.  
  544. /*
  545.  * Message Structure used in Journaling
  546.  */
  547. typedef struct tagEVENTMSG {
  548.     UINT    message;
  549.     UINT    paramL;
  550.     UINT    paramH;
  551.     DWORD    time;
  552.     HWND     hwnd;
  553. } EVENTMSG, *PEVENTMSGMSG, NEAR *NPEVENTMSGMSG, FAR *LPEVENTMSGMSG;
  554.  
  555. typedef struct tagEVENTMSG *PEVENTMSG, NEAR *NPEVENTMSG, FAR *LPEVENTMSG;
  556.  
  557. /*
  558.  * Message structure used by WH_CALLWNDPROC
  559.  */
  560. typedef struct tagCWPSTRUCT {
  561.     LPARAM  lParam;
  562.     WPARAM  wParam;
  563.     UINT    message;
  564.     HWND    hwnd;
  565. } CWPSTRUCT, *PCWPSTRUCT, NEAR *NPCWPSTRUCT, FAR *LPCWPSTRUCT;
  566.  
  567. #if(WINVER >= 0x0400)
  568. /*
  569.  * Message structure used by WH_CALLWNDPROCRET
  570.  */
  571. typedef struct tagCWPRETSTRUCT {
  572.     LRESULT lResult;
  573.     LPARAM  lParam;
  574.     WPARAM  wParam;
  575.     UINT    message;
  576.     HWND    hwnd;
  577. } CWPRETSTRUCT, *PCWPRETSTRUCT, NEAR *NPCWPRETSTRUCT, FAR *LPCWPRETSTRUCT;
  578. #endif /* WINVER >= 0x0400 */
  579.  
  580. /*
  581.  * Structure used by WH_DEBUG
  582.  */
  583. typedef struct tagDEBUGHOOKINFO
  584. {
  585.     DWORD   idThread;
  586.     DWORD   idThreadInstaller;
  587.     LPARAM  lParam;
  588.     WPARAM  wParam;
  589.     int     code;
  590. } DEBUGHOOKINFO, *PDEBUGHOOKINFO, NEAR *NPDEBUGHOOKINFO, FAR* LPDEBUGHOOKINFO;
  591.  
  592. /*
  593.  * Structure used by WH_MOUSE
  594.  */
  595. typedef struct tagMOUSEHOOKSTRUCT {
  596.     POINT   pt;
  597.     HWND    hwnd;
  598.     UINT    wHitTestCode;
  599.     DWORD   dwExtraInfo;
  600. } MOUSEHOOKSTRUCT, FAR *LPMOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT;
  601. #if(WINVER >= 0x0400)
  602. /*
  603.  * Structure used by WH_HARDWARE
  604.  */
  605. typedef struct tagHARDWAREHOOKSTRUCT {
  606.     HWND    hwnd;
  607.     UINT    message;
  608.     WPARAM  wParam;
  609.     LPARAM  lParam;
  610. } HARDWAREHOOKSTRUCT, FAR *LPHARDWAREHOOKSTRUCT, *PHARDWAREHOOKSTRUCT;
  611. #endif /* WINVER >= 0x0400 */
  612. #endif /* !NOWH */
  613.  
  614. /*
  615.  * Keyboard Layout API
  616.  */
  617. #define HKL_PREV            0
  618. #define HKL_NEXT            1
  619.  
  620.  
  621. #define KLF_ACTIVATE        0x00000001
  622. #define KLF_SUBSTITUTE_OK   0x00000002
  623. #define KLF_UNLOADPREVIOUS  0x00000004
  624. #define KLF_REORDER         0x00000008
  625. #if(WINVER >= 0x0400)
  626. #define KLF_REPLACELANG     0x00000010
  627. #define KLF_NOTELLSHELL     0x00000080
  628. #endif /* WINVER >= 0x0400 */
  629.  
  630. /*
  631.  * Size of KeyboardLayoutName (number of characters), including nul terminator
  632.  */
  633. #define KL_NAMELENGTH       9
  634.  
  635. WINUSERAPI
  636. HKL
  637. WINAPI
  638. LoadKeyboardLayoutA(
  639.     LPCSTR pwszKLID,
  640.     UINT Flags);
  641. WINUSERAPI
  642. HKL
  643. WINAPI
  644. LoadKeyboardLayoutW(
  645.     LPCWSTR pwszKLID,
  646.     UINT Flags);
  647. #ifdef UNICODE
  648. #define LoadKeyboardLayout  LoadKeyboardLayoutW
  649. #else
  650. #define LoadKeyboardLayout  LoadKeyboardLayoutA
  651. #endif // !UNICODE
  652.  
  653.  
  654. #if(WINVER >= 0x0400)
  655. WINUSERAPI
  656. HKL
  657. WINAPI
  658. ActivateKeyboardLayout(
  659.     HKL hkl,
  660.     UINT Flags);
  661. #else
  662. WINUSERAPI
  663. BOOL
  664. WINAPI
  665. ActivateKeyboardLayout(
  666.     HKL hkl,
  667.     UINT Flags);
  668. #endif /* WINVER >= 0x0400 */
  669.  
  670. #if(WINVER >= 0x0400)
  671. WINUSERAPI
  672. int
  673. WINAPI
  674. ToUnicodeEx(
  675.     UINT wVirtKey,
  676.     UINT wScanCode,
  677.     PBYTE lpKeyState,
  678.     LPWSTR pwszBuff,
  679.     int cchBuff,
  680.     UINT wFlags,
  681.     HKL dwhkl);
  682. #endif /* WINVER >= 0x0400 */
  683.  
  684. WINUSERAPI
  685. BOOL
  686. WINAPI
  687. UnloadKeyboardLayout(
  688.     HKL hkl);
  689.  
  690. WINUSERAPI
  691. BOOL
  692. WINAPI
  693. GetKeyboardLayoutNameA(
  694.     LPSTR pwszKLID);
  695. WINUSERAPI
  696. BOOL
  697. WINAPI
  698. GetKeyboardLayoutNameW(
  699.     LPWSTR pwszKLID);
  700. #ifdef UNICODE
  701. #define GetKeyboardLayoutName  GetKeyboardLayoutNameW
  702. #else
  703. #define GetKeyboardLayoutName  GetKeyboardLayoutNameA
  704. #endif // !UNICODE
  705.  
  706. #if(WINVER >= 0x0400)
  707. WINUSERAPI
  708. int
  709. WINAPI
  710. GetKeyboardLayoutList(
  711.         int nBuff,
  712.         HKL FAR *lpList);
  713.  
  714. WINUSERAPI
  715. HKL
  716. WINAPI
  717. GetKeyboardLayout(
  718.     DWORD dwLayout
  719. );
  720. #endif /* WINVER >= 0x0400 */
  721.  
  722. #ifndef NODESKTOP
  723. /*
  724.  * Desktop-specific access flags
  725.  */
  726. #define DESKTOP_READOBJECTS         0x0001L
  727. #define DESKTOP_CREATEWINDOW        0x0002L
  728. #define DESKTOP_CREATEMENU          0x0004L
  729. #define DESKTOP_HOOKCONTROL         0x0008L
  730. #define DESKTOP_JOURNALRECORD       0x0010L
  731. #define DESKTOP_JOURNALPLAYBACK     0x0020L
  732. #define DESKTOP_ENUMERATE           0x0040L
  733. #define DESKTOP_WRITEOBJECTS        0x0080L
  734. #define DESKTOP_SWITCHDESKTOP       0x0100L
  735.  
  736. /*
  737.  * Desktop-specific control flags
  738.  */
  739. #define DF_ALLOWOTHERACCOUNTHOOK    0x0001L
  740.  
  741. #ifdef _WINGDI_
  742. #ifndef NOGDI
  743.  
  744. WINUSERAPI
  745. HDESK
  746. WINAPI
  747. CreateDesktopA(
  748.     LPSTR lpszDesktop,
  749.     LPSTR lpszDevice,
  750.     LPDEVMODEA pDevmode,
  751.     DWORD dwFlags,
  752.     DWORD dwDesiredAccess,
  753.     LPSECURITY_ATTRIBUTES lpsa);
  754. WINUSERAPI
  755. HDESK
  756. WINAPI
  757. CreateDesktopW(
  758.     LPWSTR lpszDesktop,
  759.     LPWSTR lpszDevice,
  760.     LPDEVMODEW pDevmode,
  761.     DWORD dwFlags,
  762.     DWORD dwDesiredAccess,
  763.     LPSECURITY_ATTRIBUTES lpsa);
  764. #ifdef UNICODE
  765. #define CreateDesktop  CreateDesktopW
  766. #else
  767. #define CreateDesktop  CreateDesktopA
  768. #endif // !UNICODE
  769.  
  770. #endif /* NOGDI */
  771. #endif /* _WINGDI_ */
  772.  
  773. WINUSERAPI
  774. HDESK
  775. WINAPI
  776. OpenDesktopA(
  777.     LPSTR lpszDesktop,
  778.     DWORD dwFlags,
  779.     BOOL fInherit,
  780.     DWORD dwDesiredAccess);
  781. WINUSERAPI
  782. HDESK
  783. WINAPI
  784. OpenDesktopW(
  785.     LPWSTR lpszDesktop,
  786.     DWORD dwFlags,
  787.     BOOL fInherit,
  788.     DWORD dwDesiredAccess);
  789. #ifdef UNICODE
  790. #define OpenDesktop  OpenDesktopW
  791. #else
  792. #define OpenDesktop  OpenDesktopA
  793. #endif // !UNICODE
  794.  
  795. WINUSERAPI
  796. HDESK
  797. WINAPI
  798. OpenInputDesktop(
  799.     DWORD dwFlags,
  800.     BOOL fInherit,
  801.     DWORD dwDesiredAccess);
  802.  
  803. WINUSERAPI
  804. BOOL
  805. WINAPI
  806. EnumDesktopsA(
  807.     HWINSTA hwinsta,
  808.     DESKTOPENUMPROCA lpEnumFunc,
  809.     LPARAM lParam);
  810. WINUSERAPI
  811. BOOL
  812. WINAPI
  813. EnumDesktopsW(
  814.     HWINSTA hwinsta,
  815.     DESKTOPENUMPROCW lpEnumFunc,
  816.     LPARAM lParam);
  817. #ifdef UNICODE
  818. #define EnumDesktops  EnumDesktopsW
  819. #else
  820. #define EnumDesktops  EnumDesktopsA
  821. #endif // !UNICODE
  822.  
  823. WINUSERAPI
  824. BOOL
  825. WINAPI
  826. EnumDesktopWindows(
  827.     HDESK hDesktop,
  828.     WNDENUMPROC lpfn,
  829.     LPARAM lParam);
  830.  
  831. WINUSERAPI
  832. BOOL
  833. WINAPI
  834. SwitchDesktop(
  835.     HDESK hDesktop);
  836.  
  837. WINUSERAPI
  838. BOOL
  839. WINAPI
  840. SetThreadDesktop(
  841.     HDESK hDesktop);
  842.  
  843. WINUSERAPI
  844. BOOL
  845. WINAPI
  846. CloseDesktop(
  847.     HDESK hDesktop);
  848.  
  849. WINUSERAPI
  850. HDESK
  851. WINAPI
  852. GetThreadDesktop(
  853.     DWORD dwThreadId);
  854.  
  855. #endif  /* !NODESKTOP */
  856.  
  857. #ifndef NOWINDOWSTATION
  858. /*
  859.  * Windowstation-specific access flags
  860.  */
  861. #define WINSTA_ENUMDESKTOPS         0x0001L
  862. #define WINSTA_READATTRIBUTES       0x0002L
  863. #define WINSTA_ACCESSCLIPBOARD      0x0004L
  864. #define WINSTA_CREATEDESKTOP        0x0008L
  865. #define WINSTA_WRITEATTRIBUTES      0x0010L
  866. #define WINSTA_ACCESSGLOBALATOMS    0x0020L
  867. #define WINSTA_EXITWINDOWS          0x0040L
  868. #define WINSTA_ENUMERATE            0x0100L
  869. #define WINSTA_READSCREEN           0x0200L
  870.  
  871. /*
  872.  * Windowstation-specific attribute flags
  873.  */
  874. #define WSF_VISIBLE                 0x0001L
  875.  
  876. WINUSERAPI
  877. HWINSTA
  878. WINAPI
  879. CreateWindowStationA(
  880.     LPSTR lpwinsta,
  881.     DWORD dwReserved,
  882.     DWORD dwDesiredAccess,
  883.     LPSECURITY_ATTRIBUTES lpsa);
  884. WINUSERAPI
  885. HWINSTA
  886. WINAPI
  887. CreateWindowStationW(
  888.     LPWSTR lpwinsta,
  889.     DWORD dwReserved,
  890.     DWORD dwDesiredAccess,
  891.     LPSECURITY_ATTRIBUTES lpsa);
  892. #ifdef UNICODE
  893. #define CreateWindowStation  CreateWindowStationW
  894. #else
  895. #define CreateWindowStation  CreateWindowStationA
  896. #endif // !UNICODE
  897.  
  898. WINUSERAPI
  899. HWINSTA
  900. WINAPI
  901. OpenWindowStationA(
  902.     LPSTR lpszWinSta,
  903.     BOOL fInherit,
  904.     DWORD dwDesiredAccess);
  905. WINUSERAPI
  906. HWINSTA
  907. WINAPI
  908. OpenWindowStationW(
  909.     LPWSTR lpszWinSta,
  910.     BOOL fInherit,
  911.     DWORD dwDesiredAccess);
  912. #ifdef UNICODE
  913. #define OpenWindowStation  OpenWindowStationW
  914. #else
  915. #define OpenWindowStation  OpenWindowStationA
  916. #endif // !UNICODE
  917.  
  918. WINUSERAPI
  919. BOOL
  920. WINAPI
  921. EnumWindowStationsA(
  922.     WINSTAENUMPROCA lpEnumFunc,
  923.     LPARAM lParam);
  924. WINUSERAPI
  925. BOOL
  926. WINAPI
  927. EnumWindowStationsW(
  928.     WINSTAENUMPROCW lpEnumFunc,
  929.     LPARAM lParam);
  930. #ifdef UNICODE
  931. #define EnumWindowStations  EnumWindowStationsW
  932. #else
  933. #define EnumWindowStations  EnumWindowStationsA
  934. #endif // !UNICODE
  935.  
  936. WINUSERAPI
  937. BOOL
  938. WINAPI
  939. CloseWindowStation(
  940.     HWINSTA hWinSta);
  941.  
  942. WINUSERAPI
  943. BOOL
  944. WINAPI
  945. SetProcessWindowStation(
  946.     HWINSTA hWinSta);
  947.  
  948. WINUSERAPI
  949. HWINSTA
  950. WINAPI
  951. GetProcessWindowStation(
  952.     VOID);
  953. #endif  /* !NOWINDOWSTATION */
  954.  
  955. #ifndef NOSECURITY
  956.  
  957. WINUSERAPI
  958. BOOL
  959. WINAPI
  960. SetUserObjectSecurity(
  961.     HANDLE hObj,
  962.     PSECURITY_INFORMATION pSIRequested,
  963.     PSECURITY_DESCRIPTOR pSID);
  964.  
  965. WINUSERAPI
  966. BOOL
  967. WINAPI
  968. GetUserObjectSecurity(
  969.     HANDLE hObj,
  970.     PSECURITY_INFORMATION pSIRequested,
  971.     PSECURITY_DESCRIPTOR pSID,
  972.     DWORD nLength,
  973.     LPDWORD lpnLengthNeeded);
  974.  
  975. #define UOI_FLAGS       1
  976. #define UOI_NAME        2
  977. #define UOI_TYPE        3
  978. #define UOI_USER_SID    4
  979.  
  980. typedef struct tagUSEROBJECTFLAGS {
  981.     BOOL fInherit;
  982.     BOOL fReserved;
  983.     DWORD dwFlags;
  984. } USEROBJECTFLAGS, *PUSEROBJECTFLAGS;
  985.  
  986. WINUSERAPI
  987. BOOL
  988. WINAPI
  989. GetUserObjectInformationA(
  990.     HANDLE hObj,
  991.     int nIndex,
  992.     PVOID pvInfo,
  993.     DWORD nLength,
  994.     LPDWORD lpnLengthNeeded);
  995. WINUSERAPI
  996. BOOL
  997. WINAPI
  998. GetUserObjectInformationW(
  999.     HANDLE hObj,
  1000.     int nIndex,
  1001.     PVOID pvInfo,
  1002.     DWORD nLength,
  1003.     LPDWORD lpnLengthNeeded);
  1004. #ifdef UNICODE
  1005. #define GetUserObjectInformation  GetUserObjectInformationW
  1006. #else
  1007. #define GetUserObjectInformation  GetUserObjectInformationA
  1008. #endif // !UNICODE
  1009.  
  1010. WINUSERAPI
  1011. BOOL
  1012. WINAPI
  1013. SetUserObjectInformationA(
  1014.     HANDLE hObj,
  1015.     int nIndex,
  1016.     PVOID pvInfo,
  1017.     DWORD nLength);
  1018. WINUSERAPI
  1019. BOOL
  1020. WINAPI
  1021. SetUserObjectInformationW(
  1022.     HANDLE hObj,
  1023.     int nIndex,
  1024.     PVOID pvInfo,
  1025.     DWORD nLength);
  1026. #ifdef UNICODE
  1027. #define SetUserObjectInformation  SetUserObjectInformationW
  1028. #else
  1029. #define SetUserObjectInformation  SetUserObjectInformationA
  1030. #endif // !UNICODE
  1031.  
  1032. #endif  /* !NOSECURITY */
  1033.  
  1034. #if(WINVER >= 0x0400)
  1035. typedef struct tagWNDCLASSEXA {
  1036.     UINT        cbSize;
  1037.     /* Win 3.x */
  1038.     UINT        style;
  1039.     WNDPROC     lpfnWndProc;
  1040.     int         cbClsExtra;
  1041.     int         cbWndExtra;
  1042.     HINSTANCE   hInstance;
  1043.     HICON       hIcon;
  1044.     HCURSOR     hCursor;
  1045.     HBRUSH      hbrBackground;
  1046.     LPCSTR      lpszMenuName;
  1047.     LPCSTR      lpszClassName;
  1048.     /* Win 4.0 */
  1049.     HICON       hIconSm;
  1050. } WNDCLASSEXA, *PWNDCLASSEXA, NEAR *NPWNDCLASSEXA, FAR *LPWNDCLASSEXA;
  1051. typedef struct tagWNDCLASSEXW {
  1052.     UINT        cbSize;
  1053.     /* Win 3.x */
  1054.     UINT        style;
  1055.     WNDPROC     lpfnWndProc;
  1056.     int         cbClsExtra;
  1057.     int         cbWndExtra;
  1058.     HINSTANCE   hInstance;
  1059.     HICON       hIcon;
  1060.     HCURSOR     hCursor;
  1061.     HBRUSH      hbrBackground;
  1062.     LPCWSTR     lpszMenuName;
  1063.     LPCWSTR     lpszClassName;
  1064.     /* Win 4.0 */
  1065.     HICON       hIconSm;
  1066. } WNDCLASSEXW, *PWNDCLASSEXW, NEAR *NPWNDCLASSEXW, FAR *LPWNDCLASSEXW;
  1067. #ifdef UNICODE
  1068. typedef WNDCLASSEXW WNDCLASSEX;
  1069. typedef PWNDCLASSEXW PWNDCLASSEX;
  1070. typedef NPWNDCLASSEXW NPWNDCLASSEX;
  1071. typedef LPWNDCLASSEXW LPWNDCLASSEX;
  1072. #else
  1073. typedef WNDCLASSEXA WNDCLASSEX;
  1074. typedef PWNDCLASSEXA PWNDCLASSEX;
  1075. typedef NPWNDCLASSEXA NPWNDCLASSEX;
  1076. typedef LPWNDCLASSEXA LPWNDCLASSEX;
  1077. #endif // UNICODE
  1078. #endif /* WINVER >= 0x0400 */
  1079.  
  1080. typedef struct tagWNDCLASSA {
  1081.     UINT        style;
  1082.     WNDPROC     lpfnWndProc;
  1083.     int         cbClsExtra;
  1084.     int         cbWndExtra;
  1085.     HINSTANCE   hInstance;
  1086.     HICON       hIcon;
  1087.     HCURSOR     hCursor;
  1088.     HBRUSH      hbrBackground;
  1089.     LPCSTR      lpszMenuName;
  1090.     LPCSTR      lpszClassName;
  1091. } WNDCLASSA, *PWNDCLASSA, NEAR *NPWNDCLASSA, FAR *LPWNDCLASSA;
  1092. typedef struct tagWNDCLASSW {
  1093.     UINT        style;
  1094.     WNDPROC     lpfnWndProc;
  1095.     int         cbClsExtra;
  1096.     int         cbWndExtra;
  1097.     HINSTANCE   hInstance;
  1098.     HICON       hIcon;
  1099.     HCURSOR     hCursor;
  1100.     HBRUSH      hbrBackground;
  1101.     LPCWSTR     lpszMenuName;
  1102.     LPCWSTR     lpszClassName;
  1103. } WNDCLASSW, *PWNDCLASSW, NEAR *NPWNDCLASSW, FAR *LPWNDCLASSW;
  1104. #ifdef UNICODE
  1105. typedef WNDCLASSW WNDCLASS;
  1106. typedef PWNDCLASSW PWNDCLASS;
  1107. typedef NPWNDCLASSW NPWNDCLASS;
  1108. typedef LPWNDCLASSW LPWNDCLASS;
  1109. #else
  1110. typedef WNDCLASSA WNDCLASS;
  1111. typedef PWNDCLASSA PWNDCLASS;
  1112. typedef NPWNDCLASSA NPWNDCLASS;
  1113. typedef LPWNDCLASSA LPWNDCLASS;
  1114. #endif // UNICODE
  1115.  
  1116.  
  1117.  
  1118. #ifndef NOMSG
  1119.  
  1120. /*
  1121.  * Message structure
  1122.  */
  1123. typedef struct tagMSG {
  1124.     HWND        hwnd;
  1125.     UINT        message;
  1126.     WPARAM      wParam;
  1127.     LPARAM      lParam;
  1128.     DWORD       time;
  1129.     POINT       pt;
  1130. } MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
  1131.  
  1132. #define POINTSTOPOINT(pt, pts)                          \
  1133.         { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts);   \
  1134.           (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }
  1135.  
  1136. #define POINTTOPOINTS(pt)      (MAKELONG((short)((pt).x), (short)((pt).y)))
  1137. #define MAKEWPARAM(l, h)      (WPARAM)MAKELONG(l, h)
  1138. #define MAKELPARAM(l, h)      (LPARAM)MAKELONG(l, h)
  1139. #define MAKELRESULT(l, h)     (LRESULT)MAKELONG(l, h)
  1140.  
  1141.  
  1142. #endif /* !NOMSG */
  1143.  
  1144. #ifndef NOWINOFFSETS
  1145.  
  1146. /*
  1147.  * Window field offsets for GetWindowLong()
  1148.  */
  1149. #define GWL_WNDPROC         (-4)
  1150. #define GWL_HINSTANCE       (-6)
  1151. #define GWL_HWNDPARENT      (-8)
  1152. #define GWL_STYLE           (-16)
  1153. #define GWL_EXSTYLE         (-20)
  1154. #define GWL_USERDATA        (-21)
  1155. #define GWL_ID              (-12)
  1156.  
  1157. /*
  1158.  * Class field offsets for GetClassLong()
  1159.  */
  1160. #define GCL_MENUNAME        (-8)
  1161. #define GCL_HBRBACKGROUND   (-10)
  1162. #define GCL_HCURSOR         (-12)
  1163. #define GCL_HICON           (-14)
  1164. #define GCL_HMODULE         (-16)
  1165. #define GCL_CBWNDEXTRA      (-18)
  1166. #define GCL_CBCLSEXTRA      (-20)
  1167. #define GCL_WNDPROC         (-24)
  1168. #define GCL_STYLE           (-26)
  1169. #define GCW_ATOM            (-32)
  1170.  
  1171. #if(WINVER >= 0x0400)
  1172. #define GCL_HICONSM         (-34)
  1173. #endif /* WINVER >= 0x0400 */
  1174.  
  1175. #endif /* !NOWINOFFSETS */
  1176.  
  1177. #ifndef NOWINMESSAGES
  1178.  
  1179. // begin_r_winuser
  1180.  
  1181. /*
  1182.  * Window Messages
  1183.  */
  1184.  
  1185. #define WM_NULL                         0x0000
  1186. #define WM_CREATE                       0x0001
  1187. #define WM_DESTROY                      0x0002
  1188. #define WM_MOVE                         0x0003
  1189. #define WM_SIZE                         0x0005
  1190.  
  1191. #define WM_ACTIVATE                     0x0006
  1192. /*
  1193.  * WM_ACTIVATE state values
  1194.  */
  1195. #define     WA_INACTIVE     0
  1196. #define     WA_ACTIVE       1
  1197. #define     WA_CLICKACTIVE  2
  1198.  
  1199. #define WM_SETFOCUS                     0x0007
  1200. #define WM_KILLFOCUS                    0x0008
  1201. #define WM_ENABLE                       0x000A
  1202. #define WM_SETREDRAW                    0x000B
  1203. #define WM_SETTEXT                      0x000C
  1204. #define WM_GETTEXT                      0x000D
  1205. #define WM_GETTEXTLENGTH                0x000E
  1206. #define WM_PAINT                        0x000F
  1207. #define WM_CLOSE                        0x0010
  1208. #define WM_QUERYENDSESSION              0x0011
  1209. #define WM_QUIT                         0x0012
  1210. #define WM_QUERYOPEN                    0x0013
  1211. #define WM_ERASEBKGND                   0x0014
  1212. #define WM_SYSCOLORCHANGE               0x0015
  1213. #define WM_ENDSESSION                   0x0016
  1214. #define WM_SHOWWINDOW                   0x0018
  1215. #define WM_WININICHANGE                 0x001A
  1216. #if(WINVER >= 0x0400)
  1217. #define WM_SETTINGCHANGE                WM_WININICHANGE
  1218. #endif /* WINVER >= 0x0400 */
  1219.  
  1220.  
  1221. #define WM_DEVMODECHANGE                0x001B
  1222. #define WM_ACTIVATEAPP                  0x001C
  1223. #define WM_FONTCHANGE                   0x001D
  1224. #define WM_TIMECHANGE                   0x001E
  1225. #define WM_CANCELMODE                   0x001F
  1226. #define WM_SETCURSOR                    0x0020
  1227. #define WM_MOUSEACTIVATE                0x0021
  1228. #define WM_CHILDACTIVATE                0x0022
  1229. #define WM_QUEUESYNC                    0x0023
  1230.  
  1231. #define WM_GETMINMAXINFO                0x0024
  1232. // end_r_winuser
  1233. /*
  1234.  * Struct pointed to by WM_GETMINMAXINFO lParam
  1235.  */
  1236. typedef struct tagMINMAXINFO {
  1237.     POINT ptReserved;
  1238.     POINT ptMaxSize;
  1239.     POINT ptMaxPosition;
  1240.     POINT ptMinTrackSize;
  1241.     POINT ptMaxTrackSize;
  1242. } MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
  1243.  
  1244. // begin_r_winuser
  1245. #define WM_PAINTICON                    0x0026
  1246. #define WM_ICONERASEBKGND               0x0027
  1247. #define WM_NEXTDLGCTL                   0x0028
  1248. #define WM_SPOOLERSTATUS                0x002A
  1249. #define WM_DRAWITEM                     0x002B
  1250. #define WM_MEASUREITEM                  0x002C
  1251. #define WM_DELETEITEM                   0x002D
  1252. #define WM_VKEYTOITEM                   0x002E
  1253. #define WM_CHARTOITEM                   0x002F
  1254. #define WM_SETFONT                      0x0030
  1255. #define WM_GETFONT                      0x0031
  1256. #define WM_SETHOTKEY                    0x0032
  1257. #define WM_GETHOTKEY                    0x0033
  1258. #define WM_QUERYDRAGICON                0x0037
  1259. #define WM_COMPAREITEM                  0x0039
  1260.  
  1261. #define WM_COMPACTING                   0x0041
  1262. #define WM_COMMNOTIFY                   0x0044  /* no longer suported */
  1263. #define WM_WINDOWPOSCHANGING            0x0046
  1264. #define WM_WINDOWPOSCHANGED             0x0047
  1265.  
  1266. #define WM_POWER                        0x0048
  1267. /*
  1268.  * wParam for WM_POWER window message and DRV_POWER driver notification
  1269.  */
  1270. #define PWR_OK              1
  1271. #define PWR_FAIL            (-1)
  1272. #define PWR_SUSPENDREQUEST  1
  1273. #define PWR_SUSPENDRESUME   2
  1274. #define PWR_CRITICALRESUME  3
  1275.  
  1276. #define WM_COPYDATA                     0x004A
  1277. #define WM_CANCELJOURNAL                0x004B
  1278.  
  1279. // end_r_winuser
  1280.  
  1281. /*
  1282.  * lParam of WM_COPYDATA message points to...
  1283.  */
  1284. typedef struct tagCOPYDATASTRUCT {
  1285.     DWORD dwData;
  1286.     DWORD cbData;
  1287.     PVOID lpData;
  1288. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  1289.  
  1290. // begin_r_winuser
  1291.  
  1292. #if(WINVER >= 0x0400)
  1293. #define WM_NOTIFY                       0x004E
  1294. #define WM_INPUTLANGCHANGEREQUEST       0x0050
  1295. #define WM_INPUTLANGCHANGE              0x0051
  1296. #define WM_TCARD                        0x0052
  1297. #define WM_HELP                         0x0053
  1298. #define WM_USERCHANGED                  0x0054
  1299. #define WM_NOTIFYFORMAT                 0x0055
  1300.  
  1301. #define NFR_ANSI                             1
  1302. #define NFR_UNICODE                          2
  1303. #define NF_QUERY                             3
  1304. #define NF_REQUERY                           4
  1305.  
  1306. #define WM_CONTEXTMENU                  0x007B
  1307. #define WM_STYLECHANGING                0x007C
  1308. #define WM_STYLECHANGED                 0x007D
  1309. #define WM_DISPLAYCHANGE                0x007E
  1310. #define WM_GETICON                      0x007F
  1311. #define WM_SETICON                      0x0080
  1312. #endif /* WINVER >= 0x0400 */
  1313.  
  1314.  
  1315. #define WM_NCCREATE                     0x0081
  1316. #define WM_NCDESTROY                    0x0082
  1317. #define WM_NCCALCSIZE                   0x0083
  1318. #define WM_NCHITTEST                    0x0084
  1319. #define WM_NCPAINT                      0x0085
  1320. #define WM_NCACTIVATE                   0x0086
  1321. #define WM_GETDLGCODE                   0x0087
  1322.  
  1323. #define WM_NCMOUSEMOVE                  0x00A0
  1324. #define WM_NCLBUTTONDOWN                0x00A1
  1325. #define WM_NCLBUTTONUP                  0x00A2
  1326. #define WM_NCLBUTTONDBLCLK              0x00A3
  1327. #define WM_NCRBUTTONDOWN                0x00A4
  1328. #define WM_NCRBUTTONUP                  0x00A5
  1329. #define WM_NCRBUTTONDBLCLK              0x00A6
  1330. #define WM_NCMBUTTONDOWN                0x00A7
  1331. #define WM_NCMBUTTONUP                  0x00A8
  1332. #define WM_NCMBUTTONDBLCLK              0x00A9
  1333.  
  1334. #define WM_KEYFIRST                     0x0100
  1335. #define WM_KEYDOWN                      0x0100
  1336. #define WM_KEYUP                        0x0101
  1337. #define WM_CHAR                         0x0102
  1338. #define WM_DEADCHAR                     0x0103
  1339. #define WM_SYSKEYDOWN                   0x0104
  1340. #define WM_SYSKEYUP                     0x0105
  1341. #define WM_SYSCHAR                      0x0106
  1342. #define WM_SYSDEADCHAR                  0x0107
  1343. #define WM_KEYLAST                      0x0108
  1344.  
  1345. #if(WINVER >= 0x0400)
  1346. #define WM_IME_STARTCOMPOSITION         0x010D
  1347. #define WM_IME_ENDCOMPOSITION           0x010E
  1348. #define WM_IME_COMPOSITION              0x010F
  1349. #define WM_IME_KEYLAST                  0x010F
  1350. #endif /* WINVER >= 0x0400 */
  1351.  
  1352. #define WM_INITDIALOG                   0x0110
  1353. #define WM_COMMAND                      0x0111
  1354. #define WM_SYSCOMMAND                   0x0112
  1355. #define WM_TIMER                        0x0113
  1356. #define WM_HSCROLL                      0x0114
  1357. #define WM_VSCROLL                      0x0115
  1358. #define WM_INITMENU                     0x0116
  1359. #define WM_INITMENUPOPUP                0x0117
  1360. #define WM_MENUSELECT                   0x011F
  1361. #define WM_MENUCHAR                     0x0120
  1362. #define WM_ENTERIDLE                    0x0121
  1363.  
  1364. #define WM_CTLCOLORMSGBOX               0x0132
  1365. #define WM_CTLCOLOREDIT                 0x0133
  1366. #define WM_CTLCOLORLISTBOX              0x0134
  1367. #define WM_CTLCOLORBTN                  0x0135
  1368. #define WM_CTLCOLORDLG                  0x0136
  1369. #define WM_CTLCOLORSCROLLBAR            0x0137
  1370. #define WM_CTLCOLORSTATIC               0x0138
  1371.  
  1372.  
  1373.  
  1374. #define WM_MOUSEFIRST                   0x0200
  1375. #define WM_MOUSEMOVE                    0x0200
  1376. #define WM_LBUTTONDOWN                  0x0201
  1377. #define WM_LBUTTONUP                    0x0202
  1378. #define WM_LBUTTONDBLCLK                0x0203
  1379. #define WM_RBUTTONDOWN                  0x0204
  1380. #define WM_RBUTTONUP                    0x0205
  1381. #define WM_RBUTTONDBLCLK                0x0206
  1382. #define WM_MBUTTONDOWN                  0x0207
  1383. #define WM_MBUTTONUP                    0x0208
  1384. #define WM_MBUTTONDBLCLK                0x0209
  1385. #if(_WIN32_WINNT >= 0x0400)
  1386. #define WM_MOUSEWHEEL                   0x020A
  1387. #endif /* _WIN32_WINNT >= 0x0400 */
  1388. #if (_WIN32_WINNT < 0x0400)
  1389. #define WM_MOUSELAST                    0x0209
  1390. #else
  1391. #define WM_MOUSELAST                    0x020A
  1392. #endif /* if (_WIN32_WINNT < 0x0400) */
  1393.  
  1394. #if(_WIN32_WINNT >= 0x0400)
  1395. #define WHEEL_DELTA                     120     /* Value for rolling one detent */
  1396. #endif /* _WIN32_WINNT >= 0x0400 */
  1397. #if(_WIN32_WINNT >= 0x0400)
  1398. #define WHEEL_PAGESCROLL                (UINT_MAX) /* Scroll one page */
  1399. #endif /* _WIN32_WINNT >= 0x0400 */
  1400.  
  1401. #define WM_PARENTNOTIFY                 0x0210
  1402. #define MENULOOP_WINDOW                 0
  1403. #define MENULOOP_POPUP                  1
  1404. #define WM_ENTERMENULOOP                0x0211
  1405. #define WM_EXITMENULOOP                 0x0212
  1406.  
  1407. #if(WINVER >= 0x0400)
  1408. #define WM_NEXTMENU                     0x0213
  1409. // end_r_winuser
  1410.  
  1411. typedef struct tagMDINEXTMENU
  1412. {
  1413.     HMENU   hmenuIn;
  1414.     HMENU   hmenuNext;
  1415.     HWND    hwndNext;
  1416. } MDINEXTMENU, * PMDINEXTMENU, FAR * LPMDINEXTMENU;
  1417.  
  1418. // begin_r_winuser
  1419. #define WM_SIZING                       0x0214
  1420. #define WM_CAPTURECHANGED               0x0215
  1421. #define WM_MOVING                       0x0216
  1422. #define WM_POWERBROADCAST               0x0218
  1423. #define WM_DEVICECHANGE                 0x0219
  1424.  
  1425. #define WM_IME_SETCONTEXT               0x0281
  1426. #define WM_IME_NOTIFY                   0x0282
  1427. #define WM_IME_CONTROL                  0x0283
  1428. #define WM_IME_COMPOSITIONFULL          0x0284
  1429. #define WM_IME_SELECT                   0x0285
  1430. #define WM_IME_CHAR                     0x0286
  1431. #define WM_IME_KEYDOWN                  0x0290
  1432. #define WM_IME_KEYUP                    0x0291
  1433. #endif /* WINVER >= 0x0400 */
  1434.  
  1435. #define WM_MDICREATE                    0x0220
  1436. #define WM_MDIDESTROY                   0x0221
  1437. #define WM_MDIACTIVATE                  0x0222
  1438. #define WM_MDIRESTORE                   0x0223
  1439. #define WM_MDINEXT                      0x0224
  1440. #define WM_MDIMAXIMIZE                  0x0225
  1441. #define WM_MDITILE                      0x0226
  1442. #define WM_MDICASCADE                   0x0227
  1443. #define WM_MDIICONARRANGE               0x0228
  1444. #define WM_MDIGETACTIVE                 0x0229
  1445.  
  1446.  
  1447.  
  1448. #define WM_MDISETMENU                   0x0230
  1449. #define WM_ENTERSIZEMOVE                0x0231
  1450. #define WM_EXITSIZEMOVE                 0x0232
  1451. #define WM_DROPFILES                    0x0233
  1452. #define WM_MDIREFRESHMENU               0x0234
  1453.  
  1454.  
  1455. #if(_WIN32_WINNT >= 0x0400)
  1456. #define WM_MOUSEHOVER                   0x02A1
  1457. #define WM_MOUSELEAVE                   0x02A3
  1458. #endif /* _WIN32_WINNT >= 0x0400 */
  1459.  
  1460. #define WM_CUT                          0x0300
  1461. #define WM_COPY                         0x0301
  1462. #define WM_PASTE                        0x0302
  1463. #define WM_CLEAR                        0x0303
  1464. #define WM_UNDO                         0x0304
  1465. #define WM_RENDERFORMAT                 0x0305
  1466. #define WM_RENDERALLFORMATS             0x0306
  1467. #define WM_DESTROYCLIPBOARD             0x0307
  1468. #define WM_DRAWCLIPBOARD                0x0308
  1469. #define WM_PAINTCLIPBOARD               0x0309
  1470. #define WM_VSCROLLCLIPBOARD             0x030A
  1471. #define WM_SIZECLIPBOARD                0x030B
  1472. #define WM_ASKCBFORMATNAME              0x030C
  1473. #define WM_CHANGECBCHAIN                0x030D
  1474. #define WM_HSCROLLCLIPBOARD             0x030E
  1475. #define WM_QUERYNEWPALETTE              0x030F
  1476. #define WM_PALETTEISCHANGING            0x0310
  1477. #define WM_PALETTECHANGED               0x0311
  1478. #define WM_HOTKEY                       0x0312
  1479.  
  1480. #if(WINVER >= 0x0400)
  1481. #define WM_PRINT                        0x0317
  1482. #define WM_PRINTCLIENT                  0x0318
  1483.  
  1484. #define WM_HANDHELDFIRST                0x0358
  1485. #define WM_HANDHELDLAST                 0x035F
  1486.  
  1487. #define WM_AFXFIRST                     0x0360
  1488. #define WM_AFXLAST                      0x037F
  1489. #endif /* WINVER >= 0x0400 */
  1490.  
  1491. #define WM_PENWINFIRST                  0x0380
  1492. #define WM_PENWINLAST                   0x038F
  1493.  
  1494.  
  1495.  
  1496.  
  1497. #if(WINVER >= 0x0400)
  1498. #define WM_APP                          0x8000
  1499. #endif /* WINVER >= 0x0400 */
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506. /*
  1507.  * NOTE: All Message Numbers below 0x0400 are RESERVED.
  1508.  *
  1509.  * Private Window Messages Start Here:
  1510.  */
  1511. #define WM_USER                         0x0400
  1512.  
  1513. #if(WINVER >= 0x0400)
  1514.  
  1515. /*  wParam for WM_SIZING message  */
  1516. #define WMSZ_LEFT           1
  1517. #define WMSZ_RIGHT          2
  1518. #define WMSZ_TOP            3
  1519. #define WMSZ_TOPLEFT        4
  1520. #define WMSZ_TOPRIGHT       5
  1521. #define WMSZ_BOTTOM         6
  1522. #define WMSZ_BOTTOMLEFT     7
  1523. #define WMSZ_BOTTOMRIGHT    8
  1524. #endif /* WINVER >= 0x0400 */
  1525.  
  1526. #ifndef NONCMESSAGES
  1527.  
  1528. /*
  1529.  * WM_SYNCTASK Commands
  1530.  */
  1531. #define ST_BEGINSWP         0
  1532. #define ST_ENDSWP           1
  1533.  
  1534. /*
  1535.  * WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
  1536.  */
  1537. #define HTERROR             (-2)
  1538. #define HTTRANSPARENT       (-1)
  1539. #define HTNOWHERE           0
  1540. #define HTCLIENT            1
  1541. #define HTCAPTION           2
  1542. #define HTSYSMENU           3
  1543. #define HTGROWBOX           4
  1544. #define HTSIZE              HTGROWBOX
  1545. #define HTMENU              5
  1546. #define HTHSCROLL           6
  1547. #define HTVSCROLL           7
  1548. #define HTMINBUTTON         8
  1549. #define HTMAXBUTTON         9
  1550. #define HTLEFT              10
  1551. #define HTRIGHT             11
  1552. #define HTTOP               12
  1553. #define HTTOPLEFT           13
  1554. #define HTTOPRIGHT          14
  1555. #define HTBOTTOM            15
  1556. #define HTBOTTOMLEFT        16
  1557. #define HTBOTTOMRIGHT       17
  1558. #define HTBORDER            18
  1559. #define HTREDUCE            HTMINBUTTON
  1560. #define HTZOOM              HTMAXBUTTON
  1561. #define HTSIZEFIRST         HTLEFT
  1562. #define HTSIZELAST          HTBOTTOMRIGHT
  1563. #if(WINVER >= 0x0400)
  1564. #define HTOBJECT            19
  1565. #define HTCLOSE             20
  1566. #define HTHELP              21
  1567. #endif /* WINVER >= 0x0400 */
  1568.  
  1569. /*
  1570.  * SendMessageTimeout values
  1571.  */
  1572. #define SMTO_NORMAL         0x0000
  1573. #define SMTO_BLOCK          0x0001
  1574. #define SMTO_ABORTIFHUNG    0x0002
  1575.  
  1576. #endif /* !NONCMESSAGES */
  1577.  
  1578. /*
  1579.  * WM_MOUSEACTIVATE Return Codes
  1580.  */
  1581. #define MA_ACTIVATE         1
  1582. #define MA_ACTIVATEANDEAT   2
  1583. #define MA_NOACTIVATE       3
  1584. #define MA_NOACTIVATEANDEAT 4
  1585.  
  1586. /*
  1587.  * WM_SETICON / WM_GETICON Type Codes
  1588.  */
  1589. #define ICON_SMALL          0
  1590. #define ICON_BIG            1
  1591.  
  1592. // end_r_winuser
  1593.  
  1594. WINUSERAPI
  1595. UINT
  1596. WINAPI
  1597. RegisterWindowMessageA(
  1598.     LPCSTR lpString);
  1599. WINUSERAPI
  1600. UINT
  1601. WINAPI
  1602. RegisterWindowMessageW(
  1603.     LPCWSTR lpString);
  1604. #ifdef UNICODE
  1605. #define RegisterWindowMessage  RegisterWindowMessageW
  1606. #else
  1607. #define RegisterWindowMessage  RegisterWindowMessageA
  1608. #endif // !UNICODE
  1609.  
  1610. // begin_r_winuser
  1611.  
  1612. /*
  1613.  * WM_SIZE message wParam values
  1614.  */
  1615. #define SIZE_RESTORED       0
  1616. #define SIZE_MINIMIZED      1
  1617. #define SIZE_MAXIMIZED      2
  1618. #define SIZE_MAXSHOW        3
  1619. #define SIZE_MAXHIDE        4
  1620.  
  1621. /*
  1622.  * Obsolete constant names
  1623.  */
  1624. #define SIZENORMAL          SIZE_RESTORED
  1625. #define SIZEICONIC          SIZE_MINIMIZED
  1626. #define SIZEFULLSCREEN      SIZE_MAXIMIZED
  1627. #define SIZEZOOMSHOW        SIZE_MAXSHOW
  1628. #define SIZEZOOMHIDE        SIZE_MAXHIDE
  1629.  
  1630. // end_r_winuser
  1631. /*
  1632.  * WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
  1633.  */
  1634. typedef struct tagWINDOWPOS {
  1635.     HWND    hwnd;
  1636.     HWND    hwndInsertAfter;
  1637.     int     x;
  1638.     int     y;
  1639.     int     cx;
  1640.     int     cy;
  1641.     UINT    flags;
  1642. } WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
  1643.  
  1644. /*
  1645.  * WM_NCCALCSIZE parameter structure
  1646.  */
  1647. typedef struct tagNCCALCSIZE_PARAMS {
  1648.     RECT       rgrc[3];
  1649.     PWINDOWPOS lppos;
  1650. } NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
  1651.  
  1652. // begin_r_winuser
  1653. /*
  1654.  * WM_NCCALCSIZE "window valid rect" return values
  1655.  */
  1656. #define WVR_ALIGNTOP        0x0010
  1657. #define WVR_ALIGNLEFT       0x0020
  1658. #define WVR_ALIGNBOTTOM     0x0040
  1659. #define WVR_ALIGNRIGHT      0x0080
  1660. #define WVR_HREDRAW         0x0100
  1661. #define WVR_VREDRAW         0x0200
  1662. #define WVR_REDRAW         (WVR_HREDRAW | \
  1663.                             WVR_VREDRAW)
  1664. #define WVR_VALIDRECTS      0x0400
  1665.  
  1666.  
  1667. #ifndef NOKEYSTATES
  1668.  
  1669. /*
  1670.  * Key State Masks for Mouse Messages
  1671.  */
  1672. #define MK_LBUTTON          0x0001
  1673. #define MK_RBUTTON          0x0002
  1674. #define MK_SHIFT            0x0004
  1675. #define MK_CONTROL          0x0008
  1676. #define MK_MBUTTON          0x0010
  1677.  
  1678. #endif /* !NOKEYSTATES */
  1679.  
  1680. #if(_WIN32_WINNT >= 0x0400)
  1681. #ifndef NOTRACKMOUSEEVENT
  1682.  
  1683. #define TME_HOVER       0x00000001
  1684. #define TME_LEAVE       0x00000002
  1685. #define TME_QUERY       0x40000000
  1686. #define TME_CANCEL      0x80000000
  1687.  
  1688.  
  1689. #define HOVER_DEFAULT   0xFFFFFFFF
  1690. // end_r_winuser
  1691.  
  1692. typedef struct tagTRACKMOUSEEVENT {
  1693.     DWORD cbSize;
  1694.     DWORD dwFlags;
  1695.     HWND  hwndTrack;
  1696.     DWORD dwHoverTime;
  1697. } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
  1698.  
  1699. WINUSERAPI
  1700. BOOL
  1701. WINAPI
  1702. TrackMouseEvent(
  1703.     LPTRACKMOUSEEVENT lpEventTrack);
  1704.  
  1705. // begin_r_winuser
  1706.  
  1707. #endif /* !NOTRACKMOUSEEVENT */
  1708. #endif /* _WIN32_WINNT >= 0x0400 */
  1709.  
  1710. // end_r_winuser
  1711.  
  1712. #endif /* !NOWINMESSAGES */
  1713.  
  1714. #ifndef NOWINSTYLES
  1715.  
  1716. // begin_r_winuser
  1717.  
  1718. /*
  1719.  * Window Styles
  1720.  */
  1721. #define WS_OVERLAPPED       0x00000000L
  1722. #define WS_POPUP            0x80000000L
  1723. #define WS_CHILD            0x40000000L
  1724. #define WS_MINIMIZE         0x20000000L
  1725. #define WS_VISIBLE          0x10000000L
  1726. #define WS_DISABLED         0x08000000L
  1727. #define WS_CLIPSIBLINGS     0x04000000L
  1728. #define WS_CLIPCHILDREN     0x02000000L
  1729. #define WS_MAXIMIZE         0x01000000L
  1730. #define WS_CAPTION          0x00C00000L     /* WS_BORDER | WS_DLGFRAME  */
  1731. #define WS_BORDER           0x00800000L
  1732. #define WS_DLGFRAME         0x00400000L
  1733. #define WS_VSCROLL          0x00200000L
  1734. #define WS_HSCROLL          0x00100000L
  1735. #define WS_SYSMENU          0x00080000L
  1736. #define WS_THICKFRAME       0x00040000L
  1737. #define WS_GROUP            0x00020000L
  1738. #define WS_TABSTOP          0x00010000L
  1739.  
  1740. #define WS_MINIMIZEBOX      0x00020000L
  1741. #define WS_MAXIMIZEBOX      0x00010000L
  1742.  
  1743. #define WS_TILED            WS_OVERLAPPED
  1744. #define WS_ICONIC           WS_MINIMIZE
  1745. #define WS_SIZEBOX          WS_THICKFRAME
  1746. #define WS_TILEDWINDOW      WS_OVERLAPPEDWINDOW
  1747.  
  1748. /*
  1749.  * Common Window Styles
  1750.  */
  1751. #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED     | \
  1752.                              WS_CAPTION        | \
  1753.                              WS_SYSMENU        | \
  1754.                              WS_THICKFRAME     | \
  1755.                              WS_MINIMIZEBOX    | \
  1756.                              WS_MAXIMIZEBOX)
  1757.  
  1758. #define WS_POPUPWINDOW      (WS_POPUP          | \
  1759.                              WS_BORDER         | \
  1760.                              WS_SYSMENU)
  1761.  
  1762. #define WS_CHILDWINDOW      (WS_CHILD)
  1763.  
  1764. /*
  1765.  * Extended Window Styles
  1766.  */
  1767. #define WS_EX_DLGMODALFRAME     0x00000001L
  1768. #define WS_EX_NOPARENTNOTIFY    0x00000004L
  1769. #define WS_EX_TOPMOST           0x00000008L
  1770. #define WS_EX_ACCEPTFILES       0x00000010L
  1771. #define WS_EX_TRANSPARENT       0x00000020L
  1772. #if(WINVER >= 0x0400)
  1773. #define WS_EX_MDICHILD          0x00000040L
  1774. #define WS_EX_TOOLWINDOW        0x00000080L
  1775. #define WS_EX_WINDOWEDGE        0x00000100L
  1776. #define WS_EX_CLIENTEDGE        0x00000200L
  1777. #define WS_EX_CONTEXTHELP       0x00000400L
  1778.  
  1779. #define WS_EX_RIGHT             0x00001000L
  1780. #define WS_EX_LEFT              0x00000000L
  1781. #define WS_EX_RTLREADING        0x00002000L
  1782. #define WS_EX_LTRREADING        0x00000000L
  1783. #define WS_EX_LEFTSCROLLBAR     0x00004000L
  1784. #define WS_EX_RIGHTSCROLLBAR    0x00000000L
  1785.  
  1786. #define WS_EX_CONTROLPARENT     0x00010000L
  1787. #define WS_EX_STATICEDGE        0x00020000L
  1788. #define WS_EX_APPWINDOW         0x00040000L
  1789.  
  1790.  
  1791. #define WS_EX_OVERLAPPEDWINDOW  (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
  1792. #define WS_EX_PALETTEWINDOW     (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
  1793.  
  1794. #endif /* WINVER >= 0x0400 */
  1795.  
  1796.  
  1797.  
  1798. /*
  1799.  * Class styles
  1800.  */
  1801. #define CS_VREDRAW          0x0001
  1802. #define CS_HREDRAW          0x0002
  1803. #define CS_KEYCVTWINDOW     0x0004
  1804. #define CS_DBLCLKS          0x0008
  1805. #define CS_OWNDC            0x0020
  1806. #define CS_CLASSDC          0x0040
  1807. #define CS_PARENTDC         0x0080
  1808. #define CS_NOKEYCVT         0x0100
  1809. #define CS_NOCLOSE          0x0200
  1810. #define CS_SAVEBITS         0x0800
  1811. #define CS_BYTEALIGNCLIENT  0x1000
  1812. #define CS_BYTEALIGNWINDOW  0x2000
  1813. #define CS_GLOBALCLASS      0x4000
  1814.  
  1815. #if(WINVER >= 0x0400)
  1816. #define CS_IME              0x00010000
  1817. #endif /* WINVER >= 0x0400 */
  1818.  
  1819.  
  1820. // end_r_winuser
  1821.  
  1822. #endif /* !NOWINSTYLES */
  1823. #if(WINVER >= 0x0400)
  1824. /* WM_PRINT flags */
  1825. #define PRF_CHECKVISIBLE    0x00000001L
  1826. #define PRF_NONCLIENT       0x00000002L
  1827. #define PRF_CLIENT          0x00000004L
  1828. #define PRF_ERASEBKGND      0x00000008L
  1829. #define PRF_CHILDREN        0x00000010L
  1830. #define PRF_OWNED           0x00000020L
  1831.  
  1832. /* 3D border styles */
  1833. #define BDR_RAISEDOUTER 0x0001
  1834. #define BDR_SUNKENOUTER 0x0002
  1835. #define BDR_RAISEDINNER 0x0004
  1836. #define BDR_SUNKENINNER 0x0008
  1837.  
  1838. #define BDR_OUTER       0x0003
  1839. #define BDR_INNER       0x000c
  1840. #define BDR_RAISED      0x0005
  1841. #define BDR_SUNKEN      0x000a
  1842.  
  1843.  
  1844. #define EDGE_RAISED     (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  1845. #define EDGE_SUNKEN     (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  1846. #define EDGE_ETCHED     (BDR_SUNKENOUTER | BDR_RAISEDINNER)
  1847. #define EDGE_BUMP       (BDR_RAISEDOUTER | BDR_SUNKENINNER)
  1848.  
  1849. /* Border flags */
  1850. #define BF_LEFT         0x0001
  1851. #define BF_TOP          0x0002
  1852. #define BF_RIGHT        0x0004
  1853. #define BF_BOTTOM       0x0008
  1854.  
  1855. #define BF_TOPLEFT      (BF_TOP | BF_LEFT)
  1856. #define BF_TOPRIGHT     (BF_TOP | BF_RIGHT)
  1857. #define BF_BOTTOMLEFT   (BF_BOTTOM | BF_LEFT)
  1858. #define BF_BOTTOMRIGHT  (BF_BOTTOM | BF_RIGHT)
  1859. #define BF_RECT         (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM)
  1860.  
  1861. #define BF_DIAGONAL     0x0010
  1862.  
  1863. // For diagonal lines, the BF_RECT flags specify the end point of the
  1864. // vector bounded by the rectangle parameter.
  1865. #define BF_DIAGONAL_ENDTOPRIGHT     (BF_DIAGONAL | BF_TOP | BF_RIGHT)
  1866. #define BF_DIAGONAL_ENDTOPLEFT      (BF_DIAGONAL | BF_TOP | BF_LEFT)
  1867. #define BF_DIAGONAL_ENDBOTTOMLEFT   (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
  1868. #define BF_DIAGONAL_ENDBOTTOMRIGHT  (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
  1869.  
  1870.  
  1871. #define BF_MIDDLE       0x0800  /* Fill in the middle */
  1872. #define BF_SOFT         0x1000  /* For softer buttons */
  1873. #define BF_ADJUST       0x2000  /* Calculate the space left over */
  1874. #define BF_FLAT         0x4000  /* For flat rather than 3D borders */
  1875. #define BF_MONO         0x8000  /* For monochrome borders */
  1876.  
  1877.  
  1878. WINUSERAPI BOOL WINAPI DrawEdge(HDC hdc, LPRECT qrc, UINT edge, UINT grfFlags);
  1879.  
  1880. /* flags for DrawFrameControl */
  1881.  
  1882. #define DFC_CAPTION             1
  1883. #define DFC_MENU                2
  1884. #define DFC_SCROLL              3
  1885. #define DFC_BUTTON              4
  1886.  
  1887. #define DFCS_CAPTIONCLOSE       0x0000
  1888. #define DFCS_CAPTIONMIN         0x0001
  1889. #define DFCS_CAPTIONMAX         0x0002
  1890. #define DFCS_CAPTIONRESTORE     0x0003
  1891. #define DFCS_CAPTIONHELP        0x0004
  1892.  
  1893. #define DFCS_MENUARROW          0x0000
  1894. #define DFCS_MENUCHECK          0x0001
  1895. #define DFCS_MENUBULLET         0x0002
  1896. #define DFCS_MENUARROWRIGHT     0x0004
  1897.  
  1898. #define DFCS_SCROLLUP           0x0000
  1899. #define DFCS_SCROLLDOWN         0x0001
  1900. #define DFCS_SCROLLLEFT         0x0002
  1901. #define DFCS_SCROLLRIGHT        0x0003
  1902. #define DFCS_SCROLLCOMBOBOX     0x0005
  1903. #define DFCS_SCROLLSIZEGRIP     0x0008
  1904. #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
  1905.  
  1906. #define DFCS_BUTTONCHECK        0x0000
  1907. #define DFCS_BUTTONRADIOIMAGE   0x0001
  1908. #define DFCS_BUTTONRADIOMASK    0x0002
  1909. #define DFCS_BUTTONRADIO        0x0004
  1910. #define DFCS_BUTTON3STATE       0x0008
  1911. #define DFCS_BUTTONPUSH         0x0010
  1912.  
  1913. #define DFCS_INACTIVE           0x0100
  1914. #define DFCS_PUSHED             0x0200
  1915. #define DFCS_CHECKED            0x0400
  1916. #define DFCS_ADJUSTRECT         0x2000
  1917. #define DFCS_FLAT               0x4000
  1918. #define DFCS_MONO               0x8000
  1919.  
  1920. WINUSERAPI BOOL    WINAPI DrawFrameControl(HDC, LPRECT, UINT, UINT);
  1921.  
  1922.  
  1923. /* flags for DrawCaption */
  1924. #define DC_ACTIVE           0x0001
  1925. #define DC_SMALLCAP         0x0002
  1926. #define DC_ICON             0x0004
  1927. #define DC_TEXT             0x0008
  1928. #define DC_INBUTTON         0x0010
  1929.  
  1930. WINUSERAPI BOOL    WINAPI DrawCaption(HWND, HDC, CONST RECT *, UINT);
  1931.  
  1932. #define IDANI_OPEN          1
  1933. #define IDANI_CLOSE         2
  1934. #define IDANI_CAPTION       3
  1935.  
  1936.  
  1937. WINUSERAPI BOOL    WINAPI DrawAnimatedRects(HWND hwnd, int idAni, CONST RECT * lprcFrom, CONST RECT * lprcTo);
  1938.  
  1939. #endif /* WINVER >= 0x0400 */
  1940.  
  1941. #ifndef NOCLIPBOARD
  1942.  
  1943. // begin_r_winuser
  1944.  
  1945. /*
  1946.  * Predefined Clipboard Formats
  1947.  */
  1948. #define CF_TEXT             1
  1949. #define CF_BITMAP           2
  1950. #define CF_METAFILEPICT     3
  1951. #define CF_SYLK             4
  1952. #define CF_DIF              5
  1953. #define CF_TIFF             6
  1954. #define CF_OEMTEXT          7
  1955. #define CF_DIB              8
  1956. #define CF_PALETTE          9
  1957. #define CF_PENDATA          10
  1958. #define CF_RIFF             11
  1959. #define CF_WAVE             12
  1960. #define CF_UNICODETEXT      13
  1961. #define CF_ENHMETAFILE      14
  1962. #if(WINVER >= 0x0400)
  1963. #define CF_HDROP            15
  1964. #define CF_LOCALE           16
  1965. #define CF_MAX              17
  1966. #endif /* WINVER >= 0x0400 */
  1967.  
  1968. #define CF_OWNERDISPLAY     0x0080
  1969. #define CF_DSPTEXT          0x0081
  1970. #define CF_DSPBITMAP        0x0082
  1971. #define CF_DSPMETAFILEPICT  0x0083
  1972. #define CF_DSPENHMETAFILE   0x008E
  1973.  
  1974. /*
  1975.  * "Private" formats don't get GlobalFree()'d
  1976.  */
  1977. #define CF_PRIVATEFIRST     0x0200
  1978. #define CF_PRIVATELAST      0x02FF
  1979.  
  1980. /*
  1981.  * "GDIOBJ" formats do get DeleteObject()'d
  1982.  */
  1983. #define CF_GDIOBJFIRST      0x0300
  1984. #define CF_GDIOBJLAST       0x03FF
  1985.  
  1986. // end_r_winuser
  1987.  
  1988. #endif /* !NOCLIPBOARD */
  1989.  
  1990. /*
  1991.  * Defines for the fVirt field of the Accelerator table structure.
  1992.  */
  1993. #define FVIRTKEY  TRUE          /* Assumed to be == TRUE */
  1994. #define FNOINVERT 0x02
  1995. #define FSHIFT    0x04
  1996. #define FCONTROL  0x08
  1997. #define FALT      0x10
  1998.  
  1999. #ifdef __BORLANDC__
  2000. #pragma option -a4
  2001. #endif
  2002. typedef struct tagACCEL {
  2003.     BYTE   fVirt;               /* Also called the flags field */
  2004.     WORD   key;
  2005.     WORD   cmd;
  2006. } ACCEL, *LPACCEL;
  2007. #ifdef __BORLANDC__
  2008. #pragma option -a.
  2009. #endif
  2010.  
  2011. typedef struct tagPAINTSTRUCT {
  2012.     HDC         hdc;
  2013.     BOOL        fErase;
  2014.     RECT        rcPaint;
  2015.     BOOL        fRestore;
  2016.     BOOL        fIncUpdate;
  2017.     BYTE        rgbReserved[32];
  2018. } PAINTSTRUCT, *PPAINTSTRUCT, *NPPAINTSTRUCT, *LPPAINTSTRUCT;
  2019.  
  2020. typedef struct tagCREATESTRUCTA {
  2021.     LPVOID      lpCreateParams;
  2022.     HINSTANCE   hInstance;
  2023.     HMENU       hMenu;
  2024.     HWND        hwndParent;
  2025.     int         cy;
  2026.     int         cx;
  2027.     int         y;
  2028.     int         x;
  2029.     LONG        style;
  2030.     LPCSTR      lpszName;
  2031.     LPCSTR      lpszClass;
  2032.     DWORD       dwExStyle;
  2033. } CREATESTRUCTA, *LPCREATESTRUCTA;
  2034. typedef struct tagCREATESTRUCTW {
  2035.     LPVOID      lpCreateParams;
  2036.     HINSTANCE   hInstance;
  2037.     HMENU       hMenu;
  2038.     HWND        hwndParent;
  2039.     int         cy;
  2040.     int         cx;
  2041.     int         y;
  2042.     int         x;
  2043.     LONG        style;
  2044.     LPCWSTR     lpszName;
  2045.     LPCWSTR     lpszClass;
  2046.     DWORD       dwExStyle;
  2047. } CREATESTRUCTW, *LPCREATESTRUCTW;
  2048. #ifdef UNICODE
  2049. typedef CREATESTRUCTW CREATESTRUCT;
  2050. typedef LPCREATESTRUCTW LPCREATESTRUCT;
  2051. #else
  2052. typedef CREATESTRUCTA CREATESTRUCT;
  2053. typedef LPCREATESTRUCTA LPCREATESTRUCT;
  2054. #endif // UNICODE
  2055.  
  2056. typedef struct tagWINDOWPLACEMENT {
  2057.     UINT  length;
  2058.     UINT  flags;
  2059.     UINT  showCmd;
  2060.     POINT ptMinPosition;
  2061.     POINT ptMaxPosition;
  2062.     RECT  rcNormalPosition;
  2063. } WINDOWPLACEMENT;
  2064. typedef WINDOWPLACEMENT *PWINDOWPLACEMENT, *LPWINDOWPLACEMENT;
  2065.  
  2066. #define WPF_SETMINPOSITION      0x0001
  2067. #define WPF_RESTORETOMAXIMIZED  0x0002
  2068. #if(WINVER >= 0x0400)
  2069. typedef struct tagNMHDR
  2070. {
  2071.     HWND  hwndFrom;
  2072.     UINT  idFrom;
  2073.     UINT  code;         // NM_ code
  2074. }   NMHDR;
  2075. typedef NMHDR FAR * LPNMHDR;
  2076.  
  2077. typedef struct tagSTYLESTRUCT
  2078. {
  2079.     DWORD   styleOld;
  2080.     DWORD   styleNew;
  2081. } STYLESTRUCT, * LPSTYLESTRUCT;
  2082. #endif /* WINVER >= 0x0400 */
  2083.  
  2084.  
  2085. /*
  2086.  * Owner draw control types
  2087.  */
  2088. #define ODT_MENU        1
  2089. #define ODT_LISTBOX     2
  2090. #define ODT_COMBOBOX    3
  2091. #define ODT_BUTTON      4
  2092. #if(WINVER >= 0x0400)
  2093. #define ODT_STATIC      5
  2094. #endif /* WINVER >= 0x0400 */
  2095.  
  2096. /*
  2097.  * Owner draw actions
  2098.  */
  2099. #define ODA_DRAWENTIRE  0x0001
  2100. #define ODA_SELECT      0x0002
  2101. #define ODA_FOCUS       0x0004
  2102.  
  2103. /*
  2104.  * Owner draw state
  2105.  */
  2106. #define ODS_SELECTED    0x0001
  2107. #define ODS_GRAYED      0x0002
  2108. #define ODS_DISABLED    0x0004
  2109. #define ODS_CHECKED     0x0008
  2110. #define ODS_FOCUS       0x0010
  2111. #if(WINVER >= 0x0400)
  2112. #define ODS_DEFAULT         0x0020
  2113. #define ODS_COMBOBOXEDIT    0x1000
  2114. #endif /* WINVER >= 0x0400 */
  2115.  
  2116. /*
  2117.  * MEASUREITEMSTRUCT for ownerdraw
  2118.  */
  2119. typedef struct tagMEASUREITEMSTRUCT {
  2120.     UINT       CtlType;
  2121.     UINT       CtlID;
  2122.     UINT       itemID;
  2123.     UINT       itemWidth;
  2124.     UINT       itemHeight;
  2125.     DWORD      itemData;
  2126. } MEASUREITEMSTRUCT, NEAR *PMEASUREITEMSTRUCT, FAR *LPMEASUREITEMSTRUCT;
  2127.  
  2128.  
  2129.  
  2130. /*
  2131.  * DRAWITEMSTRUCT for ownerdraw
  2132.  */
  2133. typedef struct tagDRAWITEMSTRUCT {
  2134.     UINT        CtlType;
  2135.     UINT        CtlID;
  2136.     UINT        itemID;
  2137.     UINT        itemAction;
  2138.     UINT        itemState;
  2139.     HWND        hwndItem;
  2140.     HDC         hDC;
  2141.     RECT        rcItem;
  2142.     DWORD       itemData;
  2143. } DRAWITEMSTRUCT, NEAR *PDRAWITEMSTRUCT, FAR *LPDRAWITEMSTRUCT;
  2144.  
  2145. /*
  2146.  * DELETEITEMSTRUCT for ownerdraw
  2147.  */
  2148. typedef struct tagDELETEITEMSTRUCT {
  2149.     UINT       CtlType;
  2150.     UINT       CtlID;
  2151.     UINT       itemID;
  2152.     HWND       hwndItem;
  2153.     UINT       itemData;
  2154. } DELETEITEMSTRUCT, NEAR *PDELETEITEMSTRUCT, FAR *LPDELETEITEMSTRUCT;
  2155.  
  2156. /*
  2157.  * COMPAREITEMSTUCT for ownerdraw sorting
  2158.  */
  2159. typedef struct tagCOMPAREITEMSTRUCT {
  2160.     UINT        CtlType;
  2161.     UINT        CtlID;
  2162.     HWND        hwndItem;
  2163.     UINT        itemID1;
  2164.     DWORD       itemData1;
  2165.     UINT        itemID2;
  2166.     DWORD       itemData2;
  2167.     DWORD       dwLocaleId;
  2168. } COMPAREITEMSTRUCT, NEAR *PCOMPAREITEMSTRUCT, FAR *LPCOMPAREITEMSTRUCT;
  2169.  
  2170. #ifndef NOMSG
  2171.  
  2172. /*
  2173.  * Message Function Templates
  2174.  */
  2175.  
  2176. WINUSERAPI
  2177. BOOL
  2178. WINAPI
  2179. GetMessageA(
  2180.     LPMSG lpMsg,
  2181.     HWND hWnd ,
  2182.     UINT wMsgFilterMin,
  2183.     UINT wMsgFilterMax);
  2184. WINUSERAPI
  2185. BOOL
  2186. WINAPI
  2187. GetMessageW(
  2188.     LPMSG lpMsg,
  2189.     HWND hWnd ,
  2190.     UINT wMsgFilterMin,
  2191.     UINT wMsgFilterMax);
  2192. #ifdef UNICODE
  2193. #define GetMessage  GetMessageW
  2194. #else
  2195. #define GetMessage  GetMessageA
  2196. #endif // !UNICODE
  2197.  
  2198. WINUSERAPI
  2199. BOOL
  2200. WINAPI
  2201. TranslateMessage(
  2202.     CONST MSG *lpMsg);
  2203.  
  2204. WINUSERAPI
  2205. LONG
  2206. WINAPI
  2207. DispatchMessageA(
  2208.     CONST MSG *lpMsg);
  2209. WINUSERAPI
  2210. LONG
  2211. WINAPI
  2212. DispatchMessageW(
  2213.     CONST MSG *lpMsg);
  2214. #ifdef UNICODE
  2215. #define DispatchMessage  DispatchMessageW
  2216. #else
  2217. #define DispatchMessage  DispatchMessageA
  2218. #endif // !UNICODE
  2219.  
  2220.  
  2221. WINUSERAPI
  2222. BOOL
  2223. WINAPI
  2224. SetMessageQueue(
  2225.     int cMessagesMax);
  2226.  
  2227. WINUSERAPI
  2228. BOOL
  2229. WINAPI
  2230. PeekMessageA(
  2231.     LPMSG lpMsg,
  2232.     HWND hWnd ,
  2233.     UINT wMsgFilterMin,
  2234.     UINT wMsgFilterMax,
  2235.     UINT wRemoveMsg);
  2236. WINUSERAPI
  2237. BOOL
  2238. WINAPI
  2239. PeekMessageW(
  2240.     LPMSG lpMsg,
  2241.     HWND hWnd ,
  2242.     UINT wMsgFilterMin,
  2243.     UINT wMsgFilterMax,
  2244.     UINT wRemoveMsg);
  2245. #ifdef UNICODE
  2246. #define PeekMessage  PeekMessageW
  2247. #else
  2248. #define PeekMessage  PeekMessageA
  2249. #endif // !UNICODE
  2250.  
  2251. /*
  2252.  * PeekMessage() Options
  2253.  */
  2254. #define PM_NOREMOVE         0x0000
  2255. #define PM_REMOVE           0x0001
  2256. #define PM_NOYIELD          0x0002
  2257.  
  2258. #endif /* !NOMSG */
  2259.  
  2260. WINUSERAPI
  2261. BOOL
  2262. WINAPI
  2263. RegisterHotKey(
  2264.     HWND hWnd ,
  2265.     int id,
  2266.     UINT fsModifiers,
  2267.     UINT vk);
  2268.  
  2269. WINUSERAPI
  2270. BOOL
  2271. WINAPI
  2272. UnregisterHotKey(
  2273.     HWND hWnd,
  2274.     int id);
  2275.  
  2276. #define MOD_ALT         0x0001
  2277. #define MOD_CONTROL     0x0002
  2278. #define MOD_SHIFT       0x0004
  2279. #define MOD_WIN         0x0008
  2280.  
  2281.  
  2282. #define IDHOT_SNAPWINDOW        (-1)    /* SHIFT-PRINTSCRN  */
  2283. #define IDHOT_SNAPDESKTOP       (-2)    /* PRINTSCRN        */
  2284.  
  2285. #ifdef WIN_INTERNAL
  2286.     #ifndef LSTRING
  2287.     #define NOLSTRING
  2288.     #endif /* LSTRING */
  2289.     #ifndef LFILEIO
  2290.     #define NOLFILEIO
  2291.     #endif /* LFILEIO */
  2292. #endif /* WIN_INTERNAL */
  2293.  
  2294. #if(WINVER >= 0x0400)
  2295. #define EW_RESTARTWINDOWS    0x0042L
  2296. #define EW_REBOOTSYSTEM      0x0043L
  2297. #define EW_EXITANDEXECAPP    0x0044L
  2298.  
  2299. #define ENDSESSION_LOGOFF    0x80000000
  2300. #endif /* WINVER >= 0x0400 */
  2301.  
  2302. #define EWX_LOGOFF   0
  2303. #define EWX_SHUTDOWN 1
  2304. #define EWX_REBOOT   2
  2305. #define EWX_FORCE    4
  2306. #define EWX_POWEROFF 8
  2307.  
  2308.  
  2309. #define ExitWindows(dwReserved, Code) ExitWindowsEx(EWX_LOGOFF, 0xFFFFFFFF)
  2310.  
  2311. WINUSERAPI
  2312. BOOL
  2313. WINAPI
  2314. ExitWindowsEx(
  2315.     UINT uFlags,
  2316.     DWORD dwReserved);
  2317.  
  2318. WINUSERAPI
  2319. BOOL
  2320. WINAPI
  2321. SwapMouseButton(
  2322.     BOOL fSwap);
  2323.  
  2324. WINUSERAPI
  2325. DWORD
  2326. WINAPI
  2327. GetMessagePos(
  2328.     VOID);
  2329.  
  2330. WINUSERAPI
  2331. LONG
  2332. WINAPI
  2333. GetMessageTime(
  2334.     VOID);
  2335.  
  2336. WINUSERAPI
  2337. LONG
  2338. WINAPI
  2339. GetMessageExtraInfo(
  2340.     VOID);
  2341.  
  2342. #if(WINVER >= 0x0400)
  2343. WINUSERAPI
  2344. LPARAM
  2345. WINAPI
  2346. SetMessageExtraInfo(
  2347.     LPARAM lParam);
  2348. #endif /* WINVER >= 0x0400 */
  2349.  
  2350. WINUSERAPI
  2351. LRESULT
  2352. WINAPI
  2353. SendMessageA(
  2354.     HWND hWnd,
  2355.     UINT Msg,
  2356.     WPARAM wParam,
  2357.     LPARAM lParam);
  2358. WINUSERAPI
  2359. LRESULT
  2360. WINAPI
  2361. SendMessageW(
  2362.     HWND hWnd,
  2363.     UINT Msg,
  2364.     WPARAM wParam,
  2365.     LPARAM lParam);
  2366. #ifdef UNICODE
  2367. #define SendMessage  SendMessageW
  2368. #else
  2369. #define SendMessage  SendMessageA
  2370. #endif // !UNICODE
  2371.  
  2372. WINUSERAPI
  2373. LRESULT
  2374. WINAPI
  2375. SendMessageTimeoutA(
  2376.     HWND hWnd,
  2377.     UINT Msg,
  2378.     WPARAM wParam,
  2379.     LPARAM lParam,
  2380.     UINT fuFlags,
  2381.     UINT uTimeout,
  2382.     LPDWORD lpdwResult);
  2383. WINUSERAPI
  2384. LRESULT
  2385. WINAPI
  2386. SendMessageTimeoutW(
  2387.     HWND hWnd,
  2388.     UINT Msg,
  2389.     WPARAM wParam,
  2390.     LPARAM lParam,
  2391.     UINT fuFlags,
  2392.     UINT uTimeout,
  2393.     LPDWORD lpdwResult);
  2394. #ifdef UNICODE
  2395. #define SendMessageTimeout  SendMessageTimeoutW
  2396. #else
  2397. #define SendMessageTimeout  SendMessageTimeoutA
  2398. #endif // !UNICODE
  2399.  
  2400. WINUSERAPI
  2401. BOOL
  2402. WINAPI
  2403. SendNotifyMessageA(
  2404.     HWND hWnd,
  2405.     UINT Msg,
  2406.     WPARAM wParam,
  2407.     LPARAM lParam);
  2408. WINUSERAPI
  2409. BOOL
  2410. WINAPI
  2411. SendNotifyMessageW(
  2412.     HWND hWnd,
  2413.     UINT Msg,
  2414.     WPARAM wParam,
  2415.     LPARAM lParam);
  2416. #ifdef UNICODE
  2417. #define SendNotifyMessage  SendNotifyMessageW
  2418. #else
  2419. #define SendNotifyMessage  SendNotifyMessageA
  2420. #endif // !UNICODE
  2421.  
  2422. WINUSERAPI
  2423. BOOL
  2424. WINAPI
  2425. SendMessageCallbackA(
  2426.     HWND hWnd,
  2427.     UINT Msg,
  2428.     WPARAM wParam,
  2429.     LPARAM lParam,
  2430.     SENDASYNCPROC lpResultCallBack,
  2431.     DWORD dwData);
  2432. WINUSERAPI
  2433. BOOL
  2434. WINAPI
  2435. SendMessageCallbackW(
  2436.     HWND hWnd,
  2437.     UINT Msg,
  2438.     WPARAM wParam,
  2439.     LPARAM lParam,
  2440.     SENDASYNCPROC lpResultCallBack,
  2441.     DWORD dwData);
  2442. #ifdef UNICODE
  2443. #define SendMessageCallback  SendMessageCallbackW
  2444. #else
  2445. #define SendMessageCallback  SendMessageCallbackA
  2446. #endif // !UNICODE
  2447.  
  2448. #if(WINVER >= 0x0400)
  2449. WINUSERAPI long  WINAPI  BroadcastSystemMessageA(DWORD, LPDWORD, UINT, WPARAM, LPARAM);
  2450. WINUSERAPI long  WINAPI  BroadcastSystemMessageW(DWORD, LPDWORD, UINT, WPARAM, LPARAM);
  2451. #ifdef UNICODE
  2452. #define BroadcastSystemMessage  BroadcastSystemMessageW
  2453. #else
  2454. #define BroadcastSystemMessage  BroadcastSystemMessageA
  2455. #endif // !UNICODE
  2456. //Broadcast Special Message Recipient list
  2457. #define BSM_ALLCOMPONENTS       0x00000000
  2458. #define BSM_VXDS                0x00000001
  2459. #define BSM_NETDRIVER           0x00000002
  2460. #define BSM_INSTALLABLEDRIVERS  0x00000004
  2461. #define BSM_APPLICATIONS        0x00000008
  2462. #define BSM_ALLDESKTOPS         0x00000010
  2463.  
  2464. //Broadcast Special Message Flags
  2465. #define BSF_QUERY               0x00000001
  2466. #define BSF_IGNORECURRENTTASK   0x00000002
  2467. #define BSF_FLUSHDISK           0x00000004
  2468. #define BSF_NOHANG              0x00000008
  2469. #define BSF_POSTMESSAGE         0x00000010
  2470. #define BSF_FORCEIFHUNG         0x00000020
  2471. #define BSF_NOTIMEOUTIFNOTHUNG  0x00000040
  2472.  
  2473. typedef struct tagBROADCASTSYSMSG
  2474. {
  2475.     UINT    uiMessage;
  2476.     WPARAM  wParam;
  2477.     LPARAM  lParam;
  2478. } BROADCASTSYSMSG;
  2479. typedef BROADCASTSYSMSG  FAR *LPBROADCASTSYSMSG;
  2480.  
  2481. #define BROADCAST_QUERY_DENY         0x424D5144  // Return this value to deny a query.
  2482. #endif /* WINVER >= 0x0400 */
  2483.  
  2484. WINUSERAPI
  2485. BOOL
  2486. WINAPI
  2487. PostMessageA(
  2488.     HWND hWnd,
  2489.     UINT Msg,
  2490.     WPARAM wParam,
  2491.     LPARAM lParam);
  2492. WINUSERAPI
  2493. BOOL
  2494. WINAPI
  2495. PostMessageW(
  2496.     HWND hWnd,
  2497.     UINT Msg,
  2498.     WPARAM wParam,
  2499.     LPARAM lParam);
  2500. #ifdef UNICODE
  2501. #define PostMessage  PostMessageW
  2502. #else
  2503. #define PostMessage  PostMessageA
  2504. #endif // !UNICODE
  2505.  
  2506. WINUSERAPI
  2507. BOOL
  2508. WINAPI
  2509. PostThreadMessageA(
  2510.     DWORD idThread,
  2511.     UINT Msg,
  2512.     WPARAM wParam,
  2513.     LPARAM lParam);
  2514. WINUSERAPI
  2515. BOOL
  2516. WINAPI
  2517. PostThreadMessageW(
  2518.     DWORD idThread,
  2519.     UINT Msg,
  2520.     WPARAM wParam,
  2521.     LPARAM lParam);
  2522. #ifdef UNICODE
  2523. #define PostThreadMessage  PostThreadMessageW
  2524. #else
  2525. #define PostThreadMessage  PostThreadMessageA
  2526. #endif // !UNICODE
  2527.  
  2528. #define PostAppMessageA(idThread, wMsg, wParam, lParam)\
  2529.         PostThreadMessageA((DWORD)idThread, wMsg, wParam, lParam)
  2530. #define PostAppMessageW(idThread, wMsg, wParam, lParam)\
  2531.         PostThreadMessageW((DWORD)idThread, wMsg, wParam, lParam)
  2532. #ifdef UNICODE
  2533. #define PostAppMessage  PostAppMessageW
  2534. #else
  2535. #define PostAppMessage  PostAppMessageA
  2536. #endif // !UNICODE
  2537.  
  2538. /*
  2539.  * Special HWND value for use with PostMessage() and SendMessage()
  2540.  */
  2541. #define HWND_BROADCAST  ((HWND)0xffff)
  2542.  
  2543. WINUSERAPI
  2544. BOOL
  2545. WINAPI
  2546. AttachThreadInput(
  2547.     DWORD idAttach,
  2548.     DWORD idAttachTo,
  2549.     BOOL fAttach);
  2550.  
  2551.  
  2552. WINUSERAPI
  2553. BOOL
  2554. WINAPI
  2555. ReplyMessage(
  2556.     LRESULT lResult);
  2557.  
  2558. WINUSERAPI
  2559. BOOL
  2560. WINAPI
  2561. WaitMessage(
  2562.     VOID);
  2563.  
  2564. WINUSERAPI
  2565. DWORD
  2566. WINAPI
  2567. WaitForInputIdle(
  2568.     HANDLE hProcess,
  2569.     DWORD dwMilliseconds);
  2570.  
  2571. WINUSERAPI
  2572. LRESULT
  2573. WINAPI
  2574. DefWindowProcA(
  2575.     HWND hWnd,
  2576.     UINT Msg,
  2577.     WPARAM wParam,
  2578.     LPARAM lParam);
  2579. WINUSERAPI
  2580. LRESULT
  2581. WINAPI
  2582. DefWindowProcW(
  2583.     HWND hWnd,
  2584.     UINT Msg,
  2585.     WPARAM wParam,
  2586.     LPARAM lParam);
  2587. #ifdef UNICODE
  2588. #define DefWindowProc  DefWindowProcW
  2589. #else
  2590. #define DefWindowProc  DefWindowProcA
  2591. #endif // !UNICODE
  2592.  
  2593. WINUSERAPI
  2594. VOID
  2595. WINAPI
  2596. PostQuitMessage(
  2597.     int nExitCode);
  2598.  
  2599. #ifdef STRICT
  2600.  
  2601. WINUSERAPI
  2602. LRESULT
  2603. WINAPI
  2604. CallWindowProcA(
  2605.     WNDPROC lpPrevWndFunc,
  2606.     HWND hWnd,
  2607.     UINT Msg,
  2608.     WPARAM wParam,
  2609.     LPARAM lParam);
  2610. WINUSERAPI
  2611. LRESULT
  2612. WINAPI
  2613. CallWindowProcW(
  2614.     WNDPROC lpPrevWndFunc,
  2615.     HWND hWnd,
  2616.     UINT Msg,
  2617.     WPARAM wParam,
  2618.     LPARAM lParam);
  2619. #ifdef UNICODE
  2620. #define CallWindowProc  CallWindowProcW
  2621. #else
  2622. #define CallWindowProc  CallWindowProcA
  2623. #endif // !UNICODE
  2624.  
  2625. #else /* !STRICT */
  2626.  
  2627. WINUSERAPI
  2628. LRESULT
  2629. WINAPI
  2630. CallWindowProcA(
  2631.     FARPROC lpPrevWndFunc,
  2632.     HWND hWnd,
  2633.     UINT Msg,
  2634.     WPARAM wParam,
  2635.     LPARAM lParam);
  2636. WINUSERAPI
  2637. LRESULT
  2638. WINAPI
  2639. CallWindowProcW(
  2640.     FARPROC lpPrevWndFunc,
  2641.     HWND hWnd,
  2642.     UINT Msg,
  2643.     WPARAM wParam,
  2644.     LPARAM lParam);
  2645. #ifdef UNICODE
  2646. #define CallWindowProc  CallWindowProcW
  2647. #else
  2648. #define CallWindowProc  CallWindowProcA
  2649. #endif // !UNICODE
  2650.  
  2651. #endif /* !STRICT */
  2652.  
  2653. WINUSERAPI
  2654. BOOL
  2655. WINAPI
  2656. InSendMessage(
  2657.     VOID);
  2658.  
  2659. WINUSERAPI
  2660. UINT
  2661. WINAPI
  2662. GetDoubleClickTime(
  2663.     VOID);
  2664.  
  2665. WINUSERAPI
  2666. BOOL
  2667. WINAPI
  2668. SetDoubleClickTime(
  2669.     UINT);
  2670.  
  2671. WINUSERAPI
  2672. ATOM
  2673. WINAPI
  2674. RegisterClassA(
  2675.     CONST WNDCLASSA *lpWndClass);
  2676. WINUSERAPI
  2677. ATOM
  2678. WINAPI
  2679. RegisterClassW(
  2680.     CONST WNDCLASSW *lpWndClass);
  2681. #ifdef UNICODE
  2682. #define RegisterClass  RegisterClassW
  2683. #else
  2684. #define RegisterClass  RegisterClassA
  2685. #endif // !UNICODE
  2686.  
  2687. WINUSERAPI
  2688. BOOL
  2689. WINAPI
  2690. UnregisterClassA(
  2691.     LPCSTR lpClassName,
  2692.     HINSTANCE hInstance);
  2693. WINUSERAPI
  2694. BOOL
  2695. WINAPI
  2696. UnregisterClassW(
  2697.     LPCWSTR lpClassName,
  2698.     HINSTANCE hInstance);
  2699. #ifdef UNICODE
  2700. #define UnregisterClass  UnregisterClassW
  2701. #else
  2702. #define UnregisterClass  UnregisterClassA
  2703. #endif // !UNICODE
  2704.  
  2705. WINUSERAPI
  2706. BOOL
  2707. WINAPI
  2708. GetClassInfoA(
  2709.     HINSTANCE hInstance ,
  2710.     LPCSTR lpClassName,
  2711.     LPWNDCLASSA lpWndClass);
  2712. WINUSERAPI
  2713. BOOL
  2714. WINAPI
  2715. GetClassInfoW(
  2716.     HINSTANCE hInstance ,
  2717.     LPCWSTR lpClassName,
  2718.     LPWNDCLASSW lpWndClass);
  2719. #ifdef UNICODE
  2720. #define GetClassInfo  GetClassInfoW
  2721. #else
  2722. #define GetClassInfo  GetClassInfoA
  2723. #endif // !UNICODE
  2724.  
  2725. #if(WINVER >= 0x0400)
  2726. WINUSERAPI
  2727. ATOM
  2728. WINAPI
  2729. RegisterClassExA(CONST WNDCLASSEXA *);
  2730. WINUSERAPI
  2731. ATOM
  2732. WINAPI
  2733. RegisterClassExW(CONST WNDCLASSEXW *);
  2734. #ifdef UNICODE
  2735. #define RegisterClassEx  RegisterClassExW
  2736. #else
  2737. #define RegisterClassEx  RegisterClassExA
  2738. #endif // !UNICODE
  2739.  
  2740. WINUSERAPI
  2741. BOOL
  2742. WINAPI
  2743. GetClassInfoExA(HINSTANCE, LPCSTR, LPWNDCLASSEXA);
  2744. WINUSERAPI
  2745. BOOL
  2746. WINAPI
  2747. GetClassInfoExW(HINSTANCE, LPCWSTR, LPWNDCLASSEXW);
  2748. #ifdef UNICODE
  2749. #define GetClassInfoEx  GetClassInfoExW
  2750. #else
  2751. #define GetClassInfoEx  GetClassInfoExA
  2752. #endif // !UNICODE
  2753.  
  2754. #endif /* WINVER >= 0x0400 */
  2755.  
  2756. #define CW_USEDEFAULT       ((int)0x80000000)
  2757.  
  2758. /*
  2759.  * Special value for CreateWindow, et al.
  2760.  */
  2761. #define HWND_DESKTOP        ((HWND)0)
  2762.  
  2763. WINUSERAPI
  2764. HWND
  2765. WINAPI
  2766. CreateWindowExA(
  2767.     DWORD dwExStyle,
  2768.     LPCSTR lpClassName,
  2769.     LPCSTR lpWindowName,
  2770.     DWORD dwStyle,
  2771.     int X,
  2772.     int Y,
  2773.     int nWidth,
  2774.     int nHeight,
  2775.     HWND hWndParent ,
  2776.     HMENU hMenu,
  2777.     HINSTANCE hInstance,
  2778.     LPVOID lpParam);
  2779. WINUSERAPI
  2780. HWND
  2781. WINAPI
  2782. CreateWindowExW(
  2783.     DWORD dwExStyle,
  2784.     LPCWSTR lpClassName,
  2785.     LPCWSTR lpWindowName,
  2786.     DWORD dwStyle,
  2787.     int X,
  2788.     int Y,
  2789.     int nWidth,
  2790.     int nHeight,
  2791.     HWND hWndParent ,
  2792.     HMENU hMenu,
  2793.     HINSTANCE hInstance,
  2794.     LPVOID lpParam);
  2795. #ifdef UNICODE
  2796. #define CreateWindowEx  CreateWindowExW
  2797. #else
  2798. #define CreateWindowEx  CreateWindowExA
  2799. #endif // !UNICODE
  2800.  
  2801. #define CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y,\
  2802. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  2803. CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  2804. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  2805. #define CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y,\
  2806. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  2807. CreateWindowExW(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  2808. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  2809. #ifdef UNICODE
  2810. #define CreateWindow  CreateWindowW
  2811. #else
  2812. #define CreateWindow  CreateWindowA
  2813. #endif // !UNICODE
  2814.  
  2815. WINUSERAPI
  2816. BOOL
  2817. WINAPI
  2818. IsWindow(
  2819.     HWND hWnd);
  2820.  
  2821. WINUSERAPI
  2822. BOOL
  2823. WINAPI
  2824. IsMenu(
  2825.     HMENU hMenu);
  2826.  
  2827. WINUSERAPI
  2828. BOOL
  2829. WINAPI
  2830. IsChild(
  2831.     HWND hWndParent,
  2832.     HWND hWnd);
  2833.  
  2834. WINUSERAPI
  2835. BOOL
  2836. WINAPI
  2837. DestroyWindow(
  2838.     HWND hWnd);
  2839.  
  2840. WINUSERAPI
  2841. BOOL
  2842. WINAPI
  2843. ShowWindow(
  2844.     HWND hWnd,
  2845.     int nCmdShow);
  2846.  
  2847. #if(WINVER >= 0x0400)
  2848. WINUSERAPI
  2849. BOOL
  2850. WINAPI
  2851. ShowWindowAsync(
  2852.     HWND hWnd,
  2853.     int nCmdShow);
  2854. #endif /* WINVER >= 0x0400 */
  2855.  
  2856. WINUSERAPI
  2857. BOOL
  2858. WINAPI
  2859. FlashWindow(
  2860.     HWND hWnd,
  2861.     BOOL bInvert);
  2862.  
  2863. WINUSERAPI
  2864. BOOL
  2865. WINAPI
  2866. ShowOwnedPopups(
  2867.     HWND hWnd,
  2868.     BOOL fShow);
  2869.  
  2870. WINUSERAPI
  2871. BOOL
  2872. WINAPI
  2873. OpenIcon(
  2874.     HWND hWnd);
  2875.  
  2876. WINUSERAPI
  2877. BOOL
  2878. WINAPI
  2879. CloseWindow(
  2880.     HWND hWnd);
  2881.  
  2882. WINUSERAPI
  2883. BOOL
  2884. WINAPI
  2885. MoveWindow(
  2886.     HWND hWnd,
  2887.     int X,
  2888.     int Y,
  2889.     int nWidth,
  2890.     int nHeight,
  2891.     BOOL bRepaint);
  2892.  
  2893. WINUSERAPI
  2894. BOOL
  2895. WINAPI
  2896. SetWindowPos(
  2897.     HWND hWnd,
  2898.     HWND hWndInsertAfter ,
  2899.     int X,
  2900.     int Y,
  2901.     int cx,
  2902.     int cy,
  2903.     UINT uFlags);
  2904.  
  2905. WINUSERAPI
  2906. BOOL
  2907. WINAPI
  2908. GetWindowPlacement(
  2909.     HWND hWnd,
  2910.     WINDOWPLACEMENT *lpwndpl);
  2911.  
  2912. WINUSERAPI
  2913. BOOL
  2914. WINAPI
  2915. SetWindowPlacement(
  2916.     HWND hWnd,
  2917.     CONST WINDOWPLACEMENT *lpwndpl);
  2918.  
  2919.  
  2920. #ifndef NODEFERWINDOWPOS
  2921.  
  2922. WINUSERAPI
  2923. HDWP
  2924. WINAPI
  2925. BeginDeferWindowPos(
  2926.     int nNumWindows);
  2927.  
  2928. WINUSERAPI
  2929. HDWP
  2930. WINAPI
  2931. DeferWindowPos(
  2932.     HDWP hWinPosInfo,
  2933.     HWND hWnd,
  2934.     HWND hWndInsertAfter ,
  2935.     int x,
  2936.     int y,
  2937.     int cx,
  2938.     int cy,
  2939.     UINT uFlags);
  2940.  
  2941. WINUSERAPI
  2942. BOOL
  2943. WINAPI
  2944. EndDeferWindowPos(
  2945.     HDWP hWinPosInfo);
  2946.  
  2947. #endif /* !NODEFERWINDOWPOS */
  2948.  
  2949. WINUSERAPI
  2950. BOOL
  2951. WINAPI
  2952. IsWindowVisible(
  2953.     HWND hWnd);
  2954.  
  2955. WINUSERAPI
  2956. BOOL
  2957. WINAPI
  2958. IsIconic(
  2959.     HWND hWnd);
  2960.  
  2961. WINUSERAPI
  2962. BOOL
  2963. WINAPI
  2964. AnyPopup(
  2965.     VOID);
  2966.  
  2967. WINUSERAPI
  2968. BOOL
  2969. WINAPI
  2970. BringWindowToTop(
  2971.     HWND hWnd);
  2972.  
  2973. WINUSERAPI
  2974. BOOL
  2975. WINAPI
  2976. IsZoomed(
  2977.     HWND hWnd);
  2978.  
  2979. /*
  2980.  * SetWindowPos Flags
  2981.  */
  2982. #define SWP_NOSIZE          0x0001
  2983. #define SWP_NOMOVE          0x0002
  2984. #define SWP_NOZORDER        0x0004
  2985. #define SWP_NOREDRAW        0x0008
  2986. #define SWP_NOACTIVATE      0x0010
  2987. #define SWP_FRAMECHANGED    0x0020  /* The frame changed: send WM_NCCALCSIZE */
  2988. #define SWP_SHOWWINDOW      0x0040
  2989. #define SWP_HIDEWINDOW      0x0080
  2990. #define SWP_NOCOPYBITS      0x0100
  2991. #define SWP_NOOWNERZORDER   0x0200  /* Don't do owner Z ordering */
  2992. #define SWP_NOSENDCHANGING  0x0400  /* Don't send WM_WINDOWPOSCHANGING */
  2993.  
  2994. #define SWP_DRAWFRAME       SWP_FRAMECHANGED
  2995. #define SWP_NOREPOSITION    SWP_NOOWNERZORDER
  2996.  
  2997. #if(WINVER >= 0x0400)
  2998. #define SWP_DEFERERASE      0x2000
  2999. #define SWP_ASYNCWINDOWPOS  0x4000
  3000. #endif /* WINVER >= 0x0400 */
  3001.  
  3002.  
  3003. #define HWND_TOP        ((HWND)0)
  3004. #define HWND_BOTTOM     ((HWND)1)
  3005. #define HWND_TOPMOST    ((HWND)-1)
  3006. #define HWND_NOTOPMOST  ((HWND)-2)
  3007.  
  3008.  
  3009. #ifndef NOCTLMGR
  3010.  
  3011. /*
  3012.  * WARNING:
  3013.  * The following structures must NOT be DWORD padded because they are
  3014.  * followed by strings, etc that do not have to be DWORD aligned.
  3015.  */
  3016. #include <pshpack2.h>
  3017.  
  3018. /*
  3019.  * original NT 32 bit dialog template:
  3020.  */
  3021. typedef struct {
  3022.     DWORD style;
  3023.     DWORD dwExtendedStyle;
  3024.     WORD cdit;
  3025.     short x;
  3026.     short y;
  3027.     short cx;
  3028.     short cy;
  3029. } DLGTEMPLATE;
  3030. typedef DLGTEMPLATE *LPDLGTEMPLATEA;
  3031. typedef DLGTEMPLATE *LPDLGTEMPLATEW;
  3032. #ifdef UNICODE
  3033. typedef LPDLGTEMPLATEW LPDLGTEMPLATE;
  3034. #else
  3035. typedef LPDLGTEMPLATEA LPDLGTEMPLATE;
  3036. #endif // UNICODE
  3037. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
  3038. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
  3039. #ifdef UNICODE
  3040. typedef LPCDLGTEMPLATEW LPCDLGTEMPLATE;
  3041. #else
  3042. typedef LPCDLGTEMPLATEA LPCDLGTEMPLATE;
  3043. #endif // UNICODE
  3044.  
  3045. /*
  3046.  * 32 bit Dialog item template.
  3047.  */
  3048. typedef struct {
  3049.     DWORD style;
  3050.     DWORD dwExtendedStyle;
  3051.     short x;
  3052.     short y;
  3053.     short cx;
  3054.     short cy;
  3055.     WORD id;
  3056. } DLGITEMTEMPLATE;
  3057. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
  3058. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
  3059. #ifdef UNICODE
  3060. typedef PDLGITEMTEMPLATEW PDLGITEMTEMPLATE;
  3061. #else
  3062. typedef PDLGITEMTEMPLATEA PDLGITEMTEMPLATE;
  3063. #endif // UNICODE
  3064. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
  3065. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
  3066. #ifdef UNICODE
  3067. typedef LPDLGITEMTEMPLATEW LPDLGITEMTEMPLATE;
  3068. #else
  3069. typedef LPDLGITEMTEMPLATEA LPDLGITEMTEMPLATE;
  3070. #endif // UNICODE
  3071.  
  3072.  
  3073. #include <poppack.h> /* Resume normal packing */
  3074.  
  3075. WINUSERAPI
  3076. HWND
  3077. WINAPI
  3078. CreateDialogParamA(
  3079.     HINSTANCE hInstance,
  3080.     LPCSTR lpTemplateName,
  3081.     HWND hWndParent ,
  3082.     DLGPROC lpDialogFunc,
  3083.     LPARAM dwInitParam);
  3084. WINUSERAPI
  3085. HWND
  3086. WINAPI
  3087. CreateDialogParamW(
  3088.     HINSTANCE hInstance,
  3089.     LPCWSTR lpTemplateName,
  3090.     HWND hWndParent ,
  3091.     DLGPROC lpDialogFunc,
  3092.     LPARAM dwInitParam);
  3093. #ifdef UNICODE
  3094. #define CreateDialogParam  CreateDialogParamW
  3095. #else
  3096. #define CreateDialogParam  CreateDialogParamA
  3097. #endif // !UNICODE
  3098.  
  3099. WINUSERAPI
  3100. HWND
  3101. WINAPI
  3102. CreateDialogIndirectParamA(
  3103.     HINSTANCE hInstance,
  3104.     LPCDLGTEMPLATEA lpTemplate,
  3105.     HWND hWndParent,
  3106.     DLGPROC lpDialogFunc,
  3107.     LPARAM dwInitParam);
  3108. WINUSERAPI
  3109. HWND
  3110. WINAPI
  3111. CreateDialogIndirectParamW(
  3112.     HINSTANCE hInstance,
  3113.     LPCDLGTEMPLATEW lpTemplate,
  3114.     HWND hWndParent,
  3115.     DLGPROC lpDialogFunc,
  3116.     LPARAM dwInitParam);
  3117. #ifdef UNICODE
  3118. #define CreateDialogIndirectParam  CreateDialogIndirectParamW
  3119. #else
  3120. #define CreateDialogIndirectParam  CreateDialogIndirectParamA
  3121. #endif // !UNICODE
  3122.  
  3123. #define CreateDialogA(hInstance, lpName, hWndParent, lpDialogFunc) \
  3124. CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3125. #define CreateDialogW(hInstance, lpName, hWndParent, lpDialogFunc) \
  3126. CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3127. #ifdef UNICODE
  3128. #define CreateDialog  CreateDialogW
  3129. #else
  3130. #define CreateDialog  CreateDialogA
  3131. #endif // !UNICODE
  3132.  
  3133. #define CreateDialogIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3134. CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3135. #define CreateDialogIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3136. CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3137. #ifdef UNICODE
  3138. #define CreateDialogIndirect  CreateDialogIndirectW
  3139. #else
  3140. #define CreateDialogIndirect  CreateDialogIndirectA
  3141. #endif // !UNICODE
  3142.  
  3143. WINUSERAPI
  3144. int
  3145. WINAPI
  3146. DialogBoxParamA(
  3147.     HINSTANCE hInstance,
  3148.     LPCSTR lpTemplateName,
  3149.     HWND hWndParent ,
  3150.     DLGPROC lpDialogFunc,
  3151.     LPARAM dwInitParam);
  3152. WINUSERAPI
  3153. int
  3154. WINAPI
  3155. DialogBoxParamW(
  3156.     HINSTANCE hInstance,
  3157.     LPCWSTR lpTemplateName,
  3158.     HWND hWndParent ,
  3159.     DLGPROC lpDialogFunc,
  3160.     LPARAM dwInitParam);
  3161. #ifdef UNICODE
  3162. #define DialogBoxParam  DialogBoxParamW
  3163. #else
  3164. #define DialogBoxParam  DialogBoxParamA
  3165. #endif // !UNICODE
  3166.  
  3167. WINUSERAPI
  3168. int
  3169. WINAPI
  3170. DialogBoxIndirectParamA(
  3171.     HINSTANCE hInstance,
  3172.     LPCDLGTEMPLATEA hDialogTemplate,
  3173.     HWND hWndParent ,
  3174.     DLGPROC lpDialogFunc,
  3175.     LPARAM dwInitParam);
  3176. WINUSERAPI
  3177. int
  3178. WINAPI
  3179. DialogBoxIndirectParamW(
  3180.     HINSTANCE hInstance,
  3181.     LPCDLGTEMPLATEW hDialogTemplate,
  3182.     HWND hWndParent ,
  3183.     DLGPROC lpDialogFunc,
  3184.     LPARAM dwInitParam);
  3185. #ifdef UNICODE
  3186. #define DialogBoxIndirectParam  DialogBoxIndirectParamW
  3187. #else
  3188. #define DialogBoxIndirectParam  DialogBoxIndirectParamA
  3189. #endif // !UNICODE
  3190.  
  3191. #define DialogBoxA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3192. DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3193. #define DialogBoxW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3194. DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3195. #ifdef UNICODE
  3196. #define DialogBox  DialogBoxW
  3197. #else
  3198. #define DialogBox  DialogBoxA
  3199. #endif // !UNICODE
  3200.  
  3201. #define DialogBoxIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3202. DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3203. #define DialogBoxIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3204. DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3205. #ifdef UNICODE
  3206. #define DialogBoxIndirect  DialogBoxIndirectW
  3207. #else
  3208. #define DialogBoxIndirect  DialogBoxIndirectA
  3209. #endif // !UNICODE
  3210.  
  3211. WINUSERAPI
  3212. BOOL
  3213. WINAPI
  3214. EndDialog(
  3215.     HWND hDlg,
  3216.     int nResult);
  3217.  
  3218. WINUSERAPI
  3219. HWND
  3220. WINAPI
  3221. GetDlgItem(
  3222.     HWND hDlg,
  3223.     int nIDDlgItem);
  3224.  
  3225. WINUSERAPI
  3226. BOOL
  3227. WINAPI
  3228. SetDlgItemInt(
  3229.     HWND hDlg,
  3230.     int nIDDlgItem,
  3231.     UINT uValue,
  3232.     BOOL bSigned);
  3233.  
  3234. WINUSERAPI
  3235. UINT
  3236. WINAPI
  3237. GetDlgItemInt(
  3238.     HWND hDlg,
  3239.     int nIDDlgItem,
  3240.     BOOL *lpTranslated,
  3241.     BOOL bSigned);
  3242.  
  3243. WINUSERAPI
  3244. BOOL
  3245. WINAPI
  3246. SetDlgItemTextA(
  3247.     HWND hDlg,
  3248.     int nIDDlgItem,
  3249.     LPCSTR lpString);
  3250. WINUSERAPI
  3251. BOOL
  3252. WINAPI
  3253. SetDlgItemTextW(
  3254.     HWND hDlg,
  3255.     int nIDDlgItem,
  3256.     LPCWSTR lpString);
  3257. #ifdef UNICODE
  3258. #define SetDlgItemText  SetDlgItemTextW
  3259. #else
  3260. #define SetDlgItemText  SetDlgItemTextA
  3261. #endif // !UNICODE
  3262.  
  3263. WINUSERAPI
  3264. UINT
  3265. WINAPI
  3266. GetDlgItemTextA(
  3267.     HWND hDlg,
  3268.     int nIDDlgItem,
  3269.     LPSTR lpString,
  3270.     int nMaxCount);
  3271. WINUSERAPI
  3272. UINT
  3273. WINAPI
  3274. GetDlgItemTextW(
  3275.     HWND hDlg,
  3276.     int nIDDlgItem,
  3277.     LPWSTR lpString,
  3278.     int nMaxCount);
  3279. #ifdef UNICODE
  3280. #define GetDlgItemText  GetDlgItemTextW
  3281. #else
  3282. #define GetDlgItemText  GetDlgItemTextA
  3283. #endif // !UNICODE
  3284.  
  3285. WINUSERAPI
  3286. BOOL
  3287. WINAPI
  3288. CheckDlgButton(
  3289.     HWND hDlg,
  3290.     int nIDButton,
  3291.     UINT uCheck);
  3292.  
  3293. WINUSERAPI
  3294. BOOL
  3295. WINAPI
  3296. CheckRadioButton(
  3297.     HWND hDlg,
  3298.     int nIDFirstButton,
  3299.     int nIDLastButton,
  3300.     int nIDCheckButton);
  3301.  
  3302. WINUSERAPI
  3303. UINT
  3304. WINAPI
  3305. IsDlgButtonChecked(
  3306.     HWND hDlg,
  3307.     int nIDButton);
  3308.  
  3309. WINUSERAPI
  3310. LONG
  3311. WINAPI
  3312. SendDlgItemMessageA(
  3313.     HWND hDlg,
  3314.     int nIDDlgItem,
  3315.     UINT Msg,
  3316.     WPARAM wParam,
  3317.     LPARAM lParam);
  3318. WINUSERAPI
  3319. LONG
  3320. WINAPI
  3321. SendDlgItemMessageW(
  3322.     HWND hDlg,
  3323.     int nIDDlgItem,
  3324.     UINT Msg,
  3325.     WPARAM wParam,
  3326.     LPARAM lParam);
  3327. #ifdef UNICODE
  3328. #define SendDlgItemMessage  SendDlgItemMessageW
  3329. #else
  3330. #define SendDlgItemMessage  SendDlgItemMessageA
  3331. #endif // !UNICODE
  3332.  
  3333. WINUSERAPI
  3334. HWND
  3335. WINAPI
  3336. GetNextDlgGroupItem(
  3337.     HWND hDlg,
  3338.     HWND hCtl,
  3339.     BOOL bPrevious);
  3340.  
  3341. WINUSERAPI
  3342. HWND
  3343. WINAPI
  3344. GetNextDlgTabItem(
  3345.     HWND hDlg,
  3346.     HWND hCtl,
  3347.     BOOL bPrevious);
  3348.  
  3349. WINUSERAPI
  3350. int
  3351. WINAPI
  3352. GetDlgCtrlID(
  3353.     HWND hWnd);
  3354.  
  3355. WINUSERAPI
  3356. long
  3357. WINAPI
  3358. GetDialogBaseUnits(VOID);
  3359.  
  3360. WINUSERAPI
  3361. LRESULT
  3362. WINAPI
  3363. DefDlgProcA(
  3364.     HWND hDlg,
  3365.     UINT Msg,
  3366.     WPARAM wParam,
  3367.     LPARAM lParam);
  3368. WINUSERAPI
  3369. LRESULT
  3370. WINAPI
  3371. DefDlgProcW(
  3372.     HWND hDlg,
  3373.     UINT Msg,
  3374.     WPARAM wParam,
  3375.     LPARAM lParam);
  3376. #ifdef UNICODE
  3377. #define DefDlgProc  DefDlgProcW
  3378. #else
  3379. #define DefDlgProc  DefDlgProcA
  3380. #endif // !UNICODE
  3381.  
  3382. /*
  3383.  * Window extra byted needed for private dialog classes.
  3384.  */
  3385. #define DLGWINDOWEXTRA 30
  3386.  
  3387. #endif /* !NOCTLMGR */
  3388.  
  3389. #ifndef NOMSG
  3390.  
  3391. WINUSERAPI
  3392. BOOL
  3393. WINAPI
  3394. CallMsgFilterA(
  3395.     LPMSG lpMsg,
  3396.     int nCode);
  3397. WINUSERAPI
  3398. BOOL
  3399. WINAPI
  3400. CallMsgFilterW(
  3401.     LPMSG lpMsg,
  3402.     int nCode);
  3403. #ifdef UNICODE
  3404. #define CallMsgFilter  CallMsgFilterW
  3405. #else
  3406. #define CallMsgFilter  CallMsgFilterA
  3407. #endif // !UNICODE
  3408.  
  3409. #endif /* !NOMSG */
  3410.  
  3411. #ifndef NOCLIPBOARD
  3412.  
  3413. /*
  3414.  * Clipboard Manager Functions
  3415.  */
  3416.  
  3417. WINUSERAPI
  3418. BOOL
  3419. WINAPI
  3420. OpenClipboard(
  3421.     HWND hWndNewOwner);
  3422.  
  3423. WINUSERAPI
  3424. BOOL
  3425. WINAPI
  3426. CloseClipboard(
  3427.     VOID);
  3428.  
  3429. WINUSERAPI
  3430. HWND
  3431. WINAPI
  3432. GetClipboardOwner(
  3433.     VOID);
  3434.  
  3435. WINUSERAPI
  3436. HWND
  3437. WINAPI
  3438. SetClipboardViewer(
  3439.     HWND hWndNewViewer);
  3440.  
  3441. WINUSERAPI
  3442. HWND
  3443. WINAPI
  3444. GetClipboardViewer(
  3445.     VOID);
  3446.  
  3447. WINUSERAPI
  3448. BOOL
  3449. WINAPI
  3450. ChangeClipboardChain(
  3451.     HWND hWndRemove,
  3452.     HWND hWndNewNext);
  3453.  
  3454. WINUSERAPI
  3455. HANDLE
  3456. WINAPI
  3457. SetClipboardData(
  3458.     UINT uFormat,
  3459.     HANDLE hMem);
  3460.  
  3461. WINUSERAPI
  3462. HANDLE
  3463. WINAPI
  3464.     GetClipboardData(
  3465.     UINT uFormat);
  3466.  
  3467. WINUSERAPI
  3468. UINT
  3469. WINAPI
  3470. RegisterClipboardFormatA(
  3471.     LPCSTR lpszFormat);
  3472. WINUSERAPI
  3473. UINT
  3474. WINAPI
  3475. RegisterClipboardFormatW(
  3476.     LPCWSTR lpszFormat);
  3477. #ifdef UNICODE
  3478. #define RegisterClipboardFormat  RegisterClipboardFormatW
  3479. #else
  3480. #define RegisterClipboardFormat  RegisterClipboardFormatA
  3481. #endif // !UNICODE
  3482.  
  3483. WINUSERAPI
  3484. int
  3485. WINAPI
  3486. CountClipboardFormats(
  3487.     VOID);
  3488.  
  3489. WINUSERAPI
  3490. UINT
  3491. WINAPI
  3492. EnumClipboardFormats(
  3493.     UINT format);
  3494.  
  3495. WINUSERAPI
  3496. int
  3497. WINAPI
  3498. GetClipboardFormatNameA(
  3499.     UINT format,
  3500.     LPSTR lpszFormatName,
  3501.     int cchMaxCount);
  3502. WINUSERAPI
  3503. int
  3504. WINAPI
  3505. GetClipboardFormatNameW(
  3506.     UINT format,
  3507.     LPWSTR lpszFormatName,
  3508.     int cchMaxCount);
  3509. #ifdef UNICODE
  3510. #define GetClipboardFormatName  GetClipboardFormatNameW
  3511. #else
  3512. #define GetClipboardFormatName  GetClipboardFormatNameA
  3513. #endif // !UNICODE
  3514.  
  3515. WINUSERAPI
  3516. BOOL
  3517. WINAPI
  3518. EmptyClipboard(
  3519.     VOID);
  3520.  
  3521. WINUSERAPI
  3522. BOOL
  3523. WINAPI
  3524. IsClipboardFormatAvailable(
  3525.     UINT format);
  3526.  
  3527. WINUSERAPI
  3528. int
  3529. WINAPI
  3530. GetPriorityClipboardFormat(
  3531.     UINT *paFormatPriorityList,
  3532.     int cFormats);
  3533.  
  3534. WINUSERAPI
  3535. HWND
  3536. WINAPI
  3537. GetOpenClipboardWindow(
  3538.     VOID);
  3539.  
  3540. #endif /* !NOCLIPBOARD */
  3541.  
  3542. /*
  3543.  * Character Translation Routines
  3544.  */
  3545.  
  3546. WINUSERAPI
  3547. BOOL
  3548. WINAPI
  3549. CharToOemA(
  3550.     LPCSTR lpszSrc,
  3551.     LPSTR lpszDst);
  3552. WINUSERAPI
  3553. BOOL
  3554. WINAPI
  3555. CharToOemW(
  3556.     LPCWSTR lpszSrc,
  3557.     LPSTR lpszDst);
  3558. #ifdef UNICODE
  3559. #define CharToOem  CharToOemW
  3560. #else
  3561. #define CharToOem  CharToOemA
  3562. #endif // !UNICODE
  3563.  
  3564. WINUSERAPI
  3565. BOOL
  3566. WINAPI
  3567. OemToCharA(
  3568.     LPCSTR lpszSrc,
  3569.     LPSTR lpszDst);
  3570. WINUSERAPI
  3571. BOOL
  3572. WINAPI
  3573. OemToCharW(
  3574.     LPCSTR lpszSrc,
  3575.     LPWSTR lpszDst);
  3576. #ifdef UNICODE
  3577. #define OemToChar  OemToCharW
  3578. #else
  3579. #define OemToChar  OemToCharA
  3580. #endif // !UNICODE
  3581.  
  3582. WINUSERAPI
  3583. BOOL
  3584. WINAPI
  3585. CharToOemBuffA(
  3586.     LPCSTR lpszSrc,
  3587.     LPSTR lpszDst,
  3588.     DWORD cchDstLength);
  3589. WINUSERAPI
  3590. BOOL
  3591. WINAPI
  3592. CharToOemBuffW(
  3593.     LPCWSTR lpszSrc,
  3594.     LPSTR lpszDst,
  3595.     DWORD cchDstLength);
  3596. #ifdef UNICODE
  3597. #define CharToOemBuff  CharToOemBuffW
  3598. #else
  3599. #define CharToOemBuff  CharToOemBuffA
  3600. #endif // !UNICODE
  3601.  
  3602. WINUSERAPI
  3603. BOOL
  3604. WINAPI
  3605. OemToCharBuffA(
  3606.     LPCSTR lpszSrc,
  3607.     LPSTR lpszDst,
  3608.     DWORD cchDstLength);
  3609. WINUSERAPI
  3610. BOOL
  3611. WINAPI
  3612. OemToCharBuffW(
  3613.     LPCSTR lpszSrc,
  3614.     LPWSTR lpszDst,
  3615.     DWORD cchDstLength);
  3616. #ifdef UNICODE
  3617. #define OemToCharBuff  OemToCharBuffW
  3618. #else
  3619. #define OemToCharBuff  OemToCharBuffA
  3620. #endif // !UNICODE
  3621.  
  3622. WINUSERAPI
  3623. LPSTR
  3624. WINAPI
  3625. CharUpperA(
  3626.     LPSTR lpsz);
  3627. WINUSERAPI
  3628. LPWSTR
  3629. WINAPI
  3630. CharUpperW(
  3631.     LPWSTR lpsz);
  3632. #ifdef UNICODE
  3633. #define CharUpper  CharUpperW
  3634. #else
  3635. #define CharUpper  CharUpperA
  3636. #endif // !UNICODE
  3637.  
  3638. WINUSERAPI
  3639. DWORD
  3640. WINAPI
  3641. CharUpperBuffA(
  3642.     LPSTR lpsz,
  3643.     DWORD cchLength);
  3644. WINUSERAPI
  3645. DWORD
  3646. WINAPI
  3647. CharUpperBuffW(
  3648.     LPWSTR lpsz,
  3649.     DWORD cchLength);
  3650. #ifdef UNICODE
  3651. #define CharUpperBuff  CharUpperBuffW
  3652. #else
  3653. #define CharUpperBuff  CharUpperBuffA
  3654. #endif // !UNICODE
  3655.  
  3656. WINUSERAPI
  3657. LPSTR
  3658. WINAPI
  3659. CharLowerA(
  3660.     LPSTR lpsz);
  3661. WINUSERAPI
  3662. LPWSTR
  3663. WINAPI
  3664. CharLowerW(
  3665.     LPWSTR lpsz);
  3666. #ifdef UNICODE
  3667. #define CharLower  CharLowerW
  3668. #else
  3669. #define CharLower  CharLowerA
  3670. #endif // !UNICODE
  3671.  
  3672. WINUSERAPI
  3673. DWORD
  3674. WINAPI
  3675. CharLowerBuffA(
  3676.     LPSTR lpsz,
  3677.     DWORD cchLength);
  3678. WINUSERAPI
  3679. DWORD
  3680. WINAPI
  3681. CharLowerBuffW(
  3682.     LPWSTR lpsz,
  3683.     DWORD cchLength);
  3684. #ifdef UNICODE
  3685. #define CharLowerBuff  CharLowerBuffW
  3686. #else
  3687. #define CharLowerBuff  CharLowerBuffA
  3688. #endif // !UNICODE
  3689.  
  3690. WINUSERAPI
  3691. LPSTR
  3692. WINAPI
  3693. CharNextA(
  3694.     LPCSTR lpsz);
  3695. WINUSERAPI
  3696. LPWSTR
  3697. WINAPI
  3698. CharNextW(
  3699.     LPCWSTR lpsz);
  3700. #ifdef UNICODE
  3701. #define CharNext  CharNextW
  3702. #else
  3703. #define CharNext  CharNextA
  3704. #endif // !UNICODE
  3705.  
  3706. WINUSERAPI
  3707. LPSTR
  3708. WINAPI
  3709. CharPrevA(
  3710.     LPCSTR lpszStart,
  3711.     LPCSTR lpszCurrent);
  3712. WINUSERAPI
  3713. LPWSTR
  3714. WINAPI
  3715. CharPrevW(
  3716.     LPCWSTR lpszStart,
  3717.     LPCWSTR lpszCurrent);
  3718. #ifdef UNICODE
  3719. #define CharPrev  CharPrevW
  3720. #else
  3721. #define CharPrev  CharPrevA
  3722. #endif // !UNICODE
  3723.  
  3724. #if(WINVER >= 0x0400)
  3725. WINUSERAPI
  3726. LPSTR
  3727. WINAPI
  3728. CharNextExA(
  3729.      WORD CodePage,
  3730.      LPCSTR lpCurrentChar,
  3731.      DWORD dwFlags);
  3732.  
  3733. WINUSERAPI
  3734. LPSTR
  3735. WINAPI
  3736. CharPrevExA(
  3737.      WORD CodePage,
  3738.      LPCSTR lpStart,
  3739.      LPCSTR lpCurrentChar,
  3740.      DWORD dwFlags);
  3741. #endif /* WINVER >= 0x0400 */
  3742.  
  3743. /*
  3744.  * Compatibility defines for character translation routines
  3745.  */
  3746. #define AnsiToOem CharToOemA
  3747. #define OemToAnsi OemToCharA
  3748. #define AnsiToOemBuff CharToOemBuffA
  3749. #define OemToAnsiBuff OemToCharBuffA
  3750. #define AnsiUpper CharUpperA
  3751. #define AnsiUpperBuff CharUpperBuffA
  3752. #define AnsiLower CharLowerA
  3753. #define AnsiLowerBuff CharLowerBuffA
  3754. #define AnsiNext CharNextA
  3755. #define AnsiPrev CharPrevA
  3756.  
  3757. #ifndef  NOLANGUAGE
  3758. /*
  3759.  * Language dependent Routines
  3760.  */
  3761.  
  3762. WINUSERAPI
  3763. BOOL
  3764. WINAPI
  3765. IsCharAlphaA(
  3766.     CHAR ch);
  3767. WINUSERAPI
  3768. BOOL
  3769. WINAPI
  3770. IsCharAlphaW(
  3771.     WCHAR ch);
  3772. #ifdef UNICODE
  3773. #define IsCharAlpha  IsCharAlphaW
  3774. #else
  3775. #define IsCharAlpha  IsCharAlphaA
  3776. #endif // !UNICODE
  3777.  
  3778. WINUSERAPI
  3779. BOOL
  3780. WINAPI
  3781. IsCharAlphaNumericA(
  3782.     CHAR ch);
  3783. WINUSERAPI
  3784. BOOL
  3785. WINAPI
  3786. IsCharAlphaNumericW(
  3787.     WCHAR ch);
  3788. #ifdef UNICODE
  3789. #define IsCharAlphaNumeric  IsCharAlphaNumericW
  3790. #else
  3791. #define IsCharAlphaNumeric  IsCharAlphaNumericA
  3792. #endif // !UNICODE
  3793.  
  3794. WINUSERAPI
  3795. BOOL
  3796. WINAPI
  3797. IsCharUpperA(
  3798.     CHAR ch);
  3799. WINUSERAPI
  3800. BOOL
  3801. WINAPI
  3802. IsCharUpperW(
  3803.     WCHAR ch);
  3804. #ifdef UNICODE
  3805. #define IsCharUpper  IsCharUpperW
  3806. #else
  3807. #define IsCharUpper  IsCharUpperA
  3808. #endif // !UNICODE
  3809.  
  3810. WINUSERAPI
  3811. BOOL
  3812. WINAPI
  3813. IsCharLowerA(
  3814.     CHAR ch);
  3815. WINUSERAPI
  3816. BOOL
  3817. WINAPI
  3818. IsCharLowerW(
  3819.     WCHAR ch);
  3820. #ifdef UNICODE
  3821. #define IsCharLower  IsCharLowerW
  3822. #else
  3823. #define IsCharLower  IsCharLowerA
  3824. #endif // !UNICODE
  3825.  
  3826. #endif  /* !NOLANGUAGE */
  3827.  
  3828. WINUSERAPI
  3829. HWND
  3830. WINAPI
  3831. SetFocus(
  3832.     HWND hWnd);
  3833.  
  3834. WINUSERAPI
  3835. HWND
  3836. WINAPI
  3837. GetActiveWindow(
  3838.     VOID);
  3839.  
  3840. WINUSERAPI
  3841. HWND
  3842. WINAPI
  3843. GetFocus(
  3844.     VOID);
  3845.  
  3846. WINUSERAPI
  3847. UINT
  3848. WINAPI
  3849. GetKBCodePage(
  3850.     VOID);
  3851.  
  3852. WINUSERAPI
  3853. SHORT
  3854. WINAPI
  3855. GetKeyState(
  3856.     int nVirtKey);
  3857.  
  3858. WINUSERAPI
  3859. SHORT
  3860. WINAPI
  3861. GetAsyncKeyState(
  3862.     int vKey);
  3863.  
  3864. WINUSERAPI
  3865. BOOL
  3866. WINAPI
  3867. GetKeyboardState(
  3868.     PBYTE lpKeyState);
  3869.  
  3870. WINUSERAPI
  3871. BOOL
  3872. WINAPI
  3873. SetKeyboardState(
  3874.     LPBYTE lpKeyState);
  3875.  
  3876. WINUSERAPI
  3877. int
  3878. WINAPI
  3879. GetKeyNameTextA(
  3880.     LONG lParam,
  3881.     LPSTR lpString,
  3882.     int nSize
  3883.     );
  3884. WINUSERAPI
  3885. int
  3886. WINAPI
  3887. GetKeyNameTextW(
  3888.     LONG lParam,
  3889.     LPWSTR lpString,
  3890.     int nSize
  3891.     );
  3892. #ifdef UNICODE
  3893. #define GetKeyNameText  GetKeyNameTextW
  3894. #else
  3895. #define GetKeyNameText  GetKeyNameTextA
  3896. #endif // !UNICODE
  3897.  
  3898. WINUSERAPI
  3899. int
  3900. WINAPI
  3901. GetKeyboardType(
  3902.     int nTypeFlag);
  3903.  
  3904. WINUSERAPI
  3905. int
  3906. WINAPI
  3907. ToAscii(
  3908.     UINT uVirtKey,
  3909.     UINT uScanCode,
  3910.     PBYTE lpKeyState,
  3911.     LPWORD lpChar,
  3912.     UINT uFlags);
  3913.  
  3914. #if(WINVER >= 0x0400)
  3915. WINUSERAPI
  3916. int
  3917. WINAPI
  3918. ToAsciiEx(
  3919.     UINT uVirtKey,
  3920.     UINT uScanCode,
  3921.     PBYTE lpKeyState,
  3922.     LPWORD lpChar,
  3923.     UINT uFlags,
  3924.     HKL dwhkl);
  3925. #endif /* WINVER >= 0x0400 */
  3926.  
  3927. WINUSERAPI
  3928. int
  3929. WINAPI
  3930. ToUnicode(
  3931.     UINT wVirtKey,
  3932.     UINT wScanCode,
  3933.     PBYTE lpKeyState,
  3934.     LPWSTR pwszBuff,
  3935.     int cchBuff,
  3936.     UINT wFlags);
  3937.  
  3938. WINUSERAPI
  3939. DWORD
  3940. WINAPI
  3941. OemKeyScan(
  3942.     WORD wOemChar);
  3943.  
  3944. WINUSERAPI
  3945. SHORT
  3946. WINAPI
  3947. VkKeyScanA(
  3948.     CHAR ch);
  3949. WINUSERAPI
  3950. SHORT
  3951. WINAPI
  3952. VkKeyScanW(
  3953.     WCHAR ch);
  3954. #ifdef UNICODE
  3955. #define VkKeyScan  VkKeyScanW
  3956. #else
  3957. #define VkKeyScan  VkKeyScanA
  3958. #endif // !UNICODE
  3959.  
  3960. #if(WINVER >= 0x0400)
  3961. WINUSERAPI
  3962. SHORT
  3963. WINAPI VkKeyScanExA(
  3964.     CHAR  ch,
  3965.     HKL   dwhkl);
  3966. WINUSERAPI
  3967. SHORT
  3968. WINAPI VkKeyScanExW(
  3969.     WCHAR  ch,
  3970.     HKL   dwhkl);
  3971. #ifdef UNICODE
  3972. #define VkKeyScanEx  VkKeyScanExW
  3973. #else
  3974. #define VkKeyScanEx  VkKeyScanExA
  3975. #endif // !UNICODE
  3976. #endif /* WINVER >= 0x0400 */
  3977. #define KEYEVENTF_EXTENDEDKEY 0x0001
  3978. #define KEYEVENTF_KEYUP       0x0002
  3979.  
  3980. WINUSERAPI
  3981. VOID
  3982. WINAPI
  3983. keybd_event(
  3984.     BYTE bVk,
  3985.     BYTE bScan,
  3986.     DWORD dwFlags,
  3987.     DWORD dwExtraInfo);
  3988.  
  3989. #define MOUSEEVENTF_MOVE        0x0001 /* mouse move */
  3990. #define MOUSEEVENTF_LEFTDOWN    0x0002 /* left button down */
  3991. #define MOUSEEVENTF_LEFTUP      0x0004 /* left button up */
  3992. #define MOUSEEVENTF_RIGHTDOWN   0x0008 /* right button down */
  3993. #define MOUSEEVENTF_RIGHTUP     0x0010 /* right button up */
  3994. #define MOUSEEVENTF_MIDDLEDOWN  0x0020 /* middle button down */
  3995. #define MOUSEEVENTF_MIDDLEUP    0x0040 /* middle button up */
  3996. #define MOUSEEVENTF_WHEEL       0x0800 /* wheel button rolled */
  3997. #define MOUSEEVENTF_ABSOLUTE    0x8000 /* absolute move */
  3998.  
  3999. WINUSERAPI
  4000. VOID
  4001. WINAPI
  4002. mouse_event(
  4003.     DWORD dwFlags,
  4004.     DWORD dx,
  4005.     DWORD dy,
  4006.     DWORD dwData,
  4007.     DWORD dwExtraInfo);
  4008.  
  4009. WINUSERAPI
  4010. UINT
  4011. WINAPI
  4012. MapVirtualKeyA(
  4013.     UINT uCode,
  4014.     UINT uMapType);
  4015. WINUSERAPI
  4016. UINT
  4017. WINAPI
  4018. MapVirtualKeyW(
  4019.     UINT uCode,
  4020.     UINT uMapType);
  4021. #ifdef UNICODE
  4022. #define MapVirtualKey  MapVirtualKeyW
  4023. #else
  4024. #define MapVirtualKey  MapVirtualKeyA
  4025. #endif // !UNICODE
  4026.  
  4027. #if(WINVER >= 0x0400)
  4028. WINUSERAPI
  4029. UINT
  4030. WINAPI
  4031. MapVirtualKeyExA(
  4032.     UINT uCode,
  4033.     UINT uMapType,
  4034.     HKL dwhkl);
  4035. WINUSERAPI
  4036. UINT
  4037. WINAPI
  4038. MapVirtualKeyExW(
  4039.     UINT uCode,
  4040.     UINT uMapType,
  4041.     HKL dwhkl);
  4042. #ifdef UNICODE
  4043. #define MapVirtualKeyEx  MapVirtualKeyExW
  4044. #else
  4045. #define MapVirtualKeyEx  MapVirtualKeyExA
  4046. #endif // !UNICODE
  4047. #endif /* WINVER >= 0x0400 */
  4048.  
  4049. WINUSERAPI
  4050. BOOL
  4051. WINAPI
  4052. GetInputState(
  4053.     VOID);
  4054.  
  4055. WINUSERAPI
  4056. DWORD
  4057. WINAPI
  4058. GetQueueStatus(
  4059.     UINT flags);
  4060.  
  4061. WINUSERAPI
  4062. HWND
  4063. WINAPI
  4064. GetCapture(
  4065.     VOID);
  4066.  
  4067. WINUSERAPI
  4068. HWND
  4069. WINAPI
  4070. SetCapture(
  4071.     HWND hWnd);
  4072.  
  4073. WINUSERAPI
  4074. BOOL
  4075. WINAPI
  4076. ReleaseCapture(
  4077.     VOID);
  4078.  
  4079. WINUSERAPI
  4080. DWORD
  4081. WINAPI
  4082. MsgWaitForMultipleObjects(
  4083.     DWORD nCount,
  4084.     LPHANDLE pHandles,
  4085.     BOOL fWaitAll,
  4086.     DWORD dwMilliseconds,
  4087.     DWORD dwWakeMask);
  4088.  
  4089. WINUSERAPI
  4090. DWORD
  4091. WINAPI
  4092. MsgWaitForMultipleObjectsEx(
  4093.     DWORD nCount,
  4094.     LPHANDLE pHandles,
  4095.     DWORD dwMilliseconds,
  4096.     DWORD dwWakeMask,
  4097.     DWORD dwFlags);
  4098.  
  4099. #define MWMO_WAITALL      0x0001
  4100. #define MWMO_ALERTABLE    0x0002
  4101.  
  4102. /*
  4103.  * Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
  4104.  */
  4105. #define QS_KEY              0x0001
  4106. #define QS_MOUSEMOVE        0x0002
  4107. #define QS_MOUSEBUTTON      0x0004
  4108. #define QS_POSTMESSAGE      0x0008
  4109. #define QS_TIMER            0x0010
  4110. #define QS_PAINT            0x0020
  4111. #define QS_SENDMESSAGE      0x0040
  4112. #define QS_HOTKEY           0x0080
  4113. #define QS_ALLPOSTMESSAGE   0x0100
  4114.  
  4115.  
  4116.  
  4117. #define QS_MOUSE           (QS_MOUSEMOVE     | \
  4118.                             QS_MOUSEBUTTON)
  4119.  
  4120. #define QS_INPUT           (QS_MOUSE         | \
  4121.                             QS_KEY)
  4122.  
  4123. #define QS_ALLEVENTS       (QS_INPUT         | \
  4124.                             QS_POSTMESSAGE   | \
  4125.                             QS_TIMER         | \
  4126.                             QS_PAINT         | \
  4127.                             QS_HOTKEY)
  4128.  
  4129. #define QS_ALLINPUT        (QS_INPUT         | \
  4130.                             QS_POSTMESSAGE   | \
  4131.                             QS_TIMER         | \
  4132.                             QS_PAINT         | \
  4133.                             QS_HOTKEY        | \
  4134.                             QS_SENDMESSAGE)
  4135.  
  4136.  
  4137. /*
  4138.  * Windows Functions
  4139.  */
  4140.  
  4141. WINUSERAPI
  4142. UINT
  4143. WINAPI
  4144. SetTimer(
  4145.     HWND hWnd ,
  4146.     UINT nIDEvent,
  4147.     UINT uElapse,
  4148.     TIMERPROC lpTimerFunc);
  4149.  
  4150. WINUSERAPI
  4151. BOOL
  4152. WINAPI
  4153. KillTimer(
  4154.     HWND hWnd,
  4155.     UINT uIDEvent);
  4156.  
  4157. WINUSERAPI
  4158. BOOL
  4159. WINAPI
  4160. IsWindowUnicode(
  4161.     HWND hWnd);
  4162.  
  4163. WINUSERAPI
  4164. BOOL
  4165. WINAPI
  4166. EnableWindow(
  4167.     HWND hWnd,
  4168.     BOOL bEnable);
  4169.  
  4170. WINUSERAPI
  4171. BOOL
  4172. WINAPI
  4173. IsWindowEnabled(
  4174.     HWND hWnd);
  4175.  
  4176. WINUSERAPI
  4177. HACCEL
  4178. WINAPI
  4179. LoadAcceleratorsA(
  4180.     HINSTANCE hInstance,
  4181.     LPCSTR lpTableName);
  4182. WINUSERAPI
  4183. HACCEL
  4184. WINAPI
  4185. LoadAcceleratorsW(
  4186.     HINSTANCE hInstance,
  4187.     LPCWSTR lpTableName);
  4188. #ifdef UNICODE
  4189. #define LoadAccelerators  LoadAcceleratorsW
  4190. #else
  4191. #define LoadAccelerators  LoadAcceleratorsA
  4192. #endif // !UNICODE
  4193.  
  4194. WINUSERAPI
  4195. HACCEL
  4196. WINAPI
  4197. CreateAcceleratorTableA(
  4198.     LPACCEL, int);
  4199. WINUSERAPI
  4200. HACCEL
  4201. WINAPI
  4202. CreateAcceleratorTableW(
  4203.     LPACCEL, int);
  4204. #ifdef UNICODE
  4205. #define CreateAcceleratorTable  CreateAcceleratorTableW
  4206. #else
  4207. #define CreateAcceleratorTable  CreateAcceleratorTableA
  4208. #endif // !UNICODE
  4209.  
  4210. WINUSERAPI
  4211. BOOL
  4212. WINAPI
  4213. DestroyAcceleratorTable(
  4214.     HACCEL hAccel);
  4215.  
  4216. WINUSERAPI
  4217. int
  4218. WINAPI
  4219. CopyAcceleratorTableA(
  4220.     HACCEL hAccelSrc,
  4221.     LPACCEL lpAccelDst,
  4222.     int cAccelEntries);
  4223. WINUSERAPI
  4224. int
  4225. WINAPI
  4226. CopyAcceleratorTableW(
  4227.     HACCEL hAccelSrc,
  4228.     LPACCEL lpAccelDst,
  4229.     int cAccelEntries);
  4230. #ifdef UNICODE
  4231. #define CopyAcceleratorTable  CopyAcceleratorTableW
  4232. #else
  4233. #define CopyAcceleratorTable  CopyAcceleratorTableA
  4234. #endif // !UNICODE
  4235.  
  4236. #ifndef NOMSG
  4237.  
  4238. WINUSERAPI
  4239. int
  4240. WINAPI
  4241. TranslateAcceleratorA(
  4242.     HWND hWnd,
  4243.     HACCEL hAccTable,
  4244.     LPMSG lpMsg);
  4245. WINUSERAPI
  4246. int
  4247. WINAPI
  4248. TranslateAcceleratorW(
  4249.     HWND hWnd,
  4250.     HACCEL hAccTable,
  4251.     LPMSG lpMsg);
  4252. #ifdef UNICODE
  4253. #define TranslateAccelerator  TranslateAcceleratorW
  4254. #else
  4255. #define TranslateAccelerator  TranslateAcceleratorA
  4256. #endif // !UNICODE
  4257.  
  4258. #endif /* !NOMSG */
  4259.  
  4260. #ifndef NOSYSMETRICS
  4261.  
  4262. /*
  4263.  * GetSystemMetrics() codes
  4264.  */
  4265. #define SM_CXSCREEN             0
  4266. #define SM_CYSCREEN             1
  4267. #define SM_CXVSCROLL            2
  4268. #define SM_CYHSCROLL            3
  4269. #define SM_CYCAPTION            4
  4270. #define SM_CXBORDER             5
  4271. #define SM_CYBORDER             6
  4272. #define SM_CXDLGFRAME           7
  4273. #define SM_CYDLGFRAME           8
  4274. #define SM_CYVTHUMB             9
  4275. #define SM_CXHTHUMB             10
  4276. #define SM_CXICON               11
  4277. #define SM_CYICON               12
  4278. #define SM_CXCURSOR             13
  4279. #define SM_CYCURSOR             14
  4280. #define SM_CYMENU               15
  4281. #define SM_CXFULLSCREEN         16
  4282. #define SM_CYFULLSCREEN         17
  4283. #define SM_CYKANJIWINDOW        18
  4284. #define SM_MOUSEPRESENT         19
  4285. #define SM_CYVSCROLL            20
  4286. #define SM_CXHSCROLL            21
  4287. #define SM_DEBUG                22
  4288. #define SM_SWAPBUTTON           23
  4289. #define SM_RESERVED1            24
  4290. #define SM_RESERVED2            25
  4291. #define SM_RESERVED3            26
  4292. #define SM_RESERVED4            27
  4293. #define SM_CXMIN                28
  4294. #define SM_CYMIN                29
  4295. #define SM_CXSIZE               30
  4296. #define SM_CYSIZE               31
  4297. #define SM_CXFRAME              32
  4298. #define SM_CYFRAME              33
  4299. #define SM_CXMINTRACK           34
  4300. #define SM_CYMINTRACK           35
  4301. #define SM_CXDOUBLECLK          36
  4302. #define SM_CYDOUBLECLK          37
  4303. #define SM_CXICONSPACING        38
  4304. #define SM_CYICONSPACING        39
  4305. #define SM_MENUDROPALIGNMENT    40
  4306. #define SM_PENWINDOWS           41
  4307. #define SM_DBCSENABLED          42
  4308. #define SM_CMOUSEBUTTONS        43
  4309.  
  4310. #if(WINVER >= 0x0400)
  4311. #define SM_CXFIXEDFRAME           SM_CXDLGFRAME  /* ;win40 name change */
  4312. #define SM_CYFIXEDFRAME           SM_CYDLGFRAME  /* ;win40 name change */
  4313. #define SM_CXSIZEFRAME            SM_CXFRAME     /* ;win40 name change */
  4314. #define SM_CYSIZEFRAME            SM_CYFRAME     /* ;win40 name change */
  4315.  
  4316. #define SM_SECURE               44
  4317. #define SM_CXEDGE               45
  4318. #define SM_CYEDGE               46
  4319. #define SM_CXMINSPACING         47
  4320. #define SM_CYMINSPACING         48
  4321. #define SM_CXSMICON             49
  4322. #define SM_CYSMICON             50
  4323. #define SM_CYSMCAPTION          51
  4324. #define SM_CXSMSIZE             52
  4325. #define SM_CYSMSIZE             53
  4326. #define SM_CXMENUSIZE           54
  4327. #define SM_CYMENUSIZE           55
  4328. #define SM_ARRANGE              56
  4329. #define SM_CXMINIMIZED          57
  4330. #define SM_CYMINIMIZED          58
  4331. #define SM_CXMAXTRACK           59
  4332. #define SM_CYMAXTRACK           60
  4333. #define SM_CXMAXIMIZED          61
  4334. #define SM_CYMAXIMIZED          62
  4335. #define SM_NETWORK              63
  4336. #define SM_CLEANBOOT            67
  4337. #define SM_CXDRAG               68
  4338. #define SM_CYDRAG               69
  4339. #endif /* WINVER >= 0x0400 */
  4340. #define SM_SHOWSOUNDS           70
  4341. #if(WINVER >= 0x0400)
  4342. #define SM_CXMENUCHECK          71   /* Use instead of GetMenuCheckMarkDimensions()! */
  4343. #define SM_CYMENUCHECK          72
  4344. #define SM_SLOWMACHINE          73
  4345. #define SM_MIDEASTENABLED       74
  4346. #endif /* WINVER >= 0x0400 */
  4347. #if(_WIN32_WINNT >= 0x0400)
  4348. #define SM_MOUSEWHEELPRESENT    75
  4349. #endif /* _WIN32_WINNT >= 0x0400 */
  4350. #if (_WIN32_WINNT < 0x0400)
  4351. #define SM_CMETRICS             75
  4352. #else
  4353. #define SM_CMETRICS             76
  4354. #endif
  4355.  
  4356.  
  4357.  
  4358. WINUSERAPI
  4359. int
  4360. WINAPI
  4361. GetSystemMetrics(
  4362.     int nIndex);
  4363.  
  4364. #endif /* !NOSYSMETRICS */
  4365.  
  4366. #ifndef NOMENUS
  4367.  
  4368. WINUSERAPI
  4369. HMENU
  4370. WINAPI
  4371. LoadMenuA(
  4372.     HINSTANCE hInstance,
  4373.     LPCSTR lpMenuName);
  4374. WINUSERAPI
  4375. HMENU
  4376. WINAPI
  4377. LoadMenuW(
  4378.     HINSTANCE hInstance,
  4379.     LPCWSTR lpMenuName);
  4380. #ifdef UNICODE
  4381. #define LoadMenu  LoadMenuW
  4382. #else
  4383. #define LoadMenu  LoadMenuA
  4384. #endif // !UNICODE
  4385.  
  4386. WINUSERAPI
  4387. HMENU
  4388. WINAPI
  4389. LoadMenuIndirectA(
  4390.     CONST MENUTEMPLATEA *lpMenuTemplate);
  4391. WINUSERAPI
  4392. HMENU
  4393. WINAPI
  4394. LoadMenuIndirectW(
  4395.     CONST MENUTEMPLATEW *lpMenuTemplate);
  4396. #ifdef UNICODE
  4397. #define LoadMenuIndirect  LoadMenuIndirectW
  4398. #else
  4399. #define LoadMenuIndirect  LoadMenuIndirectA
  4400. #endif // !UNICODE
  4401.  
  4402. WINUSERAPI
  4403. HMENU
  4404. WINAPI
  4405. GetMenu(
  4406.     HWND hWnd);
  4407.  
  4408. WINUSERAPI
  4409. BOOL
  4410. WINAPI
  4411. SetMenu(
  4412.     HWND hWnd,
  4413.     HMENU hMenu);
  4414.  
  4415. WINUSERAPI
  4416. BOOL
  4417. WINAPI
  4418. ChangeMenuA(
  4419.     HMENU hMenu,
  4420.     UINT cmd,
  4421.     LPCSTR lpszNewItem,
  4422.     UINT cmdInsert,
  4423.     UINT flags);
  4424. WINUSERAPI
  4425. BOOL
  4426. WINAPI
  4427. ChangeMenuW(
  4428.     HMENU hMenu,
  4429.     UINT cmd,
  4430.     LPCWSTR lpszNewItem,
  4431.     UINT cmdInsert,
  4432.     UINT flags);
  4433. #ifdef UNICODE
  4434. #define ChangeMenu  ChangeMenuW
  4435. #else
  4436. #define ChangeMenu  ChangeMenuA
  4437. #endif // !UNICODE
  4438.  
  4439. WINUSERAPI
  4440. BOOL
  4441. WINAPI
  4442. HiliteMenuItem(
  4443.     HWND hWnd,
  4444.     HMENU hMenu,
  4445.     UINT uIDHiliteItem,
  4446.     UINT uHilite);
  4447.  
  4448. WINUSERAPI
  4449. int
  4450. WINAPI
  4451. GetMenuStringA(
  4452.     HMENU hMenu,
  4453.     UINT uIDItem,
  4454.     LPSTR lpString,
  4455.     int nMaxCount,
  4456.     UINT uFlag);
  4457. WINUSERAPI
  4458. int
  4459. WINAPI
  4460. GetMenuStringW(
  4461.     HMENU hMenu,
  4462.     UINT uIDItem,
  4463.     LPWSTR lpString,
  4464.     int nMaxCount,
  4465.     UINT uFlag);
  4466. #ifdef UNICODE
  4467. #define GetMenuString  GetMenuStringW
  4468. #else
  4469. #define GetMenuString  GetMenuStringA
  4470. #endif // !UNICODE
  4471.  
  4472. WINUSERAPI
  4473. UINT
  4474. WINAPI
  4475. GetMenuState(
  4476.     HMENU hMenu,
  4477.     UINT uId,
  4478.     UINT uFlags);
  4479.  
  4480. WINUSERAPI
  4481. BOOL
  4482. WINAPI
  4483. DrawMenuBar(
  4484.     HWND hWnd);
  4485.  
  4486.  
  4487. WINUSERAPI
  4488. HMENU
  4489. WINAPI
  4490. GetSystemMenu(
  4491.     HWND hWnd,
  4492.     BOOL bRevert);
  4493.  
  4494.  
  4495.  
  4496. WINUSERAPI
  4497. HMENU
  4498. WINAPI
  4499. CreateMenu(
  4500.     VOID);
  4501.  
  4502. WINUSERAPI
  4503. HMENU
  4504. WINAPI
  4505. CreatePopupMenu(
  4506.     VOID);
  4507.  
  4508. WINUSERAPI
  4509. BOOL
  4510. WINAPI
  4511. DestroyMenu(
  4512.     HMENU hMenu);
  4513.  
  4514. WINUSERAPI
  4515. DWORD
  4516. WINAPI
  4517. CheckMenuItem(
  4518.     HMENU hMenu,
  4519.     UINT uIDCheckItem,
  4520.     UINT uCheck);
  4521.  
  4522. WINUSERAPI
  4523. BOOL
  4524. WINAPI
  4525. EnableMenuItem(
  4526.     HMENU hMenu,
  4527.     UINT uIDEnableItem,
  4528.     UINT uEnable);
  4529.  
  4530. WINUSERAPI
  4531. HMENU
  4532. WINAPI
  4533. GetSubMenu(
  4534.     HMENU hMenu,
  4535.     int nPos);
  4536.  
  4537. WINUSERAPI
  4538. UINT
  4539. WINAPI
  4540. GetMenuItemID(
  4541.     HMENU hMenu,
  4542.     int nPos);
  4543.  
  4544. WINUSERAPI
  4545. int
  4546. WINAPI
  4547. GetMenuItemCount(
  4548.     HMENU hMenu);
  4549.  
  4550. WINUSERAPI
  4551. BOOL
  4552. WINAPI
  4553. InsertMenuA(
  4554.     HMENU hMenu,
  4555.     UINT uPosition,
  4556.     UINT uFlags,
  4557.     UINT uIDNewItem,
  4558.     LPCSTR lpNewItem
  4559.     );
  4560. WINUSERAPI
  4561. BOOL
  4562. WINAPI
  4563. InsertMenuW(
  4564.     HMENU hMenu,
  4565.     UINT uPosition,
  4566.     UINT uFlags,
  4567.     UINT uIDNewItem,
  4568.     LPCWSTR lpNewItem
  4569.     );
  4570. #ifdef UNICODE
  4571. #define InsertMenu  InsertMenuW
  4572. #else
  4573. #define InsertMenu  InsertMenuA
  4574. #endif // !UNICODE
  4575.  
  4576. WINUSERAPI
  4577. BOOL
  4578. WINAPI
  4579. AppendMenuA(
  4580.     HMENU hMenu,
  4581.     UINT uFlags,
  4582.     UINT uIDNewItem,
  4583.     LPCSTR lpNewItem
  4584.     );
  4585. WINUSERAPI
  4586. BOOL
  4587. WINAPI
  4588. AppendMenuW(
  4589.     HMENU hMenu,
  4590.     UINT uFlags,
  4591.     UINT uIDNewItem,
  4592.     LPCWSTR lpNewItem
  4593.     );
  4594. #ifdef UNICODE
  4595. #define AppendMenu  AppendMenuW
  4596. #else
  4597. #define AppendMenu  AppendMenuA
  4598. #endif // !UNICODE
  4599.  
  4600. WINUSERAPI
  4601. BOOL
  4602. WINAPI
  4603. ModifyMenuA(
  4604.     HMENU hMnu,
  4605.     UINT uPosition,
  4606.     UINT uFlags,
  4607.     UINT uIDNewItem,
  4608.     LPCSTR lpNewItem
  4609.     );
  4610. WINUSERAPI
  4611. BOOL
  4612. WINAPI
  4613. ModifyMenuW(
  4614.     HMENU hMnu,
  4615.     UINT uPosition,
  4616.     UINT uFlags,
  4617.     UINT uIDNewItem,
  4618.     LPCWSTR lpNewItem
  4619.     );
  4620. #ifdef UNICODE
  4621. #define ModifyMenu  ModifyMenuW
  4622. #else
  4623. #define ModifyMenu  ModifyMenuA
  4624. #endif // !UNICODE
  4625.  
  4626. WINUSERAPI
  4627. BOOL
  4628. WINAPI RemoveMenu(
  4629.     HMENU hMenu,
  4630.     UINT uPosition,
  4631.     UINT uFlags);
  4632.  
  4633. WINUSERAPI
  4634. BOOL
  4635. WINAPI
  4636. DeleteMenu(
  4637.     HMENU hMenu,
  4638.     UINT uPosition,
  4639.     UINT uFlags);
  4640.  
  4641. WINUSERAPI
  4642. BOOL
  4643. WINAPI
  4644. SetMenuItemBitmaps(
  4645.     HMENU hMenu,
  4646.     UINT uPosition,
  4647.     UINT uFlags,
  4648.     HBITMAP hBitmapUnchecked,
  4649.     HBITMAP hBitmapChecked);
  4650.  
  4651. WINUSERAPI
  4652. LONG
  4653. WINAPI
  4654. GetMenuCheckMarkDimensions(
  4655.     VOID);
  4656.  
  4657. WINUSERAPI
  4658. BOOL
  4659. WINAPI
  4660. TrackPopupMenu(
  4661.     HMENU hMenu,
  4662.     UINT uFlags,
  4663.     int x,
  4664.     int y,
  4665.     int nReserved,
  4666.     HWND hWnd,
  4667.     CONST RECT *prcRect);
  4668.  
  4669. #if(WINVER >= 0x0400)
  4670. /* return codes for WM_MENUCHAR */
  4671. #define MNC_IGNORE  0
  4672. #define MNC_CLOSE   1
  4673. #define MNC_EXECUTE 2
  4674. #define MNC_SELECT  3
  4675.  
  4676. typedef struct tagTPMPARAMS
  4677. {
  4678.     UINT    cbSize;     /* Size of structure */
  4679.     RECT    rcExclude;  /* Screen coordinates of rectangle to exclude when positioning */
  4680. }   TPMPARAMS;
  4681. typedef TPMPARAMS FAR *LPTPMPARAMS;
  4682.  
  4683. WINUSERAPI BOOL    WINAPI TrackPopupMenuEx(HMENU, UINT, int, int, HWND, LPTPMPARAMS);
  4684. #endif /* WINVER >= 0x0400 */
  4685.  
  4686.  
  4687. #if(WINVER >= 0x0400)
  4688. #define MIIM_STATE       0x00000001
  4689. #define MIIM_ID          0x00000002
  4690. #define MIIM_SUBMENU     0x00000004
  4691. #define MIIM_CHECKMARKS  0x00000008
  4692. #define MIIM_TYPE        0x00000010
  4693. #define MIIM_DATA        0x00000020
  4694. #endif /* WINVER >= 0x0400 */
  4695.  
  4696.  
  4697. #if(WINVER >= 0x0400)
  4698. typedef struct tagMENUITEMINFOA
  4699. {
  4700.     UINT    cbSize;
  4701.     UINT    fMask;
  4702.     UINT    fType;          // used if MIIM_TYPE
  4703.     UINT    fState;         // used if MIIM_STATE
  4704.     UINT    wID;            // used if MIIM_ID
  4705.     HMENU   hSubMenu;       // used if MIIM_SUBMENU
  4706.     HBITMAP hbmpChecked;    // used if MIIM_CHECKMARKS
  4707.     HBITMAP hbmpUnchecked;  // used if MIIM_CHECKMARKS
  4708.     DWORD   dwItemData;     // used if MIIM_DATA
  4709.     LPSTR   dwTypeData;     // used if MIIM_TYPE
  4710.     UINT    cch;            // used if MIIM_TYPE
  4711. }   MENUITEMINFOA, FAR *LPMENUITEMINFOA;
  4712. typedef struct tagMENUITEMINFOW
  4713. {
  4714.     UINT    cbSize;
  4715.     UINT    fMask;
  4716.     UINT    fType;          // used if MIIM_TYPE
  4717.     UINT    fState;         // used if MIIM_STATE
  4718.     UINT    wID;            // used if MIIM_ID
  4719.     HMENU   hSubMenu;       // used if MIIM_SUBMENU
  4720.     HBITMAP hbmpChecked;    // used if MIIM_CHECKMARKS
  4721.     HBITMAP hbmpUnchecked;  // used if MIIM_CHECKMARKS
  4722.     DWORD   dwItemData;     // used if MIIM_DATA
  4723.     LPWSTR  dwTypeData;     // used if MIIM_TYPE
  4724.     UINT    cch;            // used if MIIM_TYPE
  4725. }   MENUITEMINFOW, FAR *LPMENUITEMINFOW;
  4726. #ifdef UNICODE
  4727. typedef MENUITEMINFOW MENUITEMINFO;
  4728. typedef LPMENUITEMINFOW LPMENUITEMINFO;
  4729. #else
  4730. typedef MENUITEMINFOA MENUITEMINFO;
  4731. typedef LPMENUITEMINFOA LPMENUITEMINFO;
  4732. #endif // UNICODE
  4733. typedef MENUITEMINFOA CONST FAR *LPCMENUITEMINFOA;
  4734. typedef MENUITEMINFOW CONST FAR *LPCMENUITEMINFOW;
  4735. #ifdef UNICODE
  4736. typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
  4737. #else
  4738. typedef LPCMENUITEMINFOA LPCMENUITEMINFO;
  4739. #endif // UNICODE
  4740.  
  4741. WINUSERAPI
  4742. BOOL
  4743. WINAPI
  4744. InsertMenuItemA(
  4745.     HMENU,
  4746.     UINT,
  4747.     BOOL,
  4748.     LPCMENUITEMINFOA
  4749.     );
  4750. WINUSERAPI
  4751. BOOL
  4752. WINAPI
  4753. InsertMenuItemW(
  4754.     HMENU,
  4755.     UINT,
  4756.     BOOL,
  4757.     LPCMENUITEMINFOW
  4758.     );
  4759. #ifdef UNICODE
  4760. #define InsertMenuItem  InsertMenuItemW
  4761. #else
  4762. #define InsertMenuItem  InsertMenuItemA
  4763. #endif // !UNICODE
  4764.  
  4765. WINUSERAPI
  4766. BOOL
  4767. WINAPI
  4768. GetMenuItemInfoA(
  4769.     HMENU,
  4770.     UINT,
  4771.     BOOL,
  4772.     LPMENUITEMINFOA
  4773.     );
  4774. WINUSERAPI
  4775. BOOL
  4776. WINAPI
  4777. GetMenuItemInfoW(
  4778.     HMENU,
  4779.     UINT,
  4780.     BOOL,
  4781.     LPMENUITEMINFOW
  4782.     );
  4783. #ifdef UNICODE
  4784. #define GetMenuItemInfo  GetMenuItemInfoW
  4785. #else
  4786. #define GetMenuItemInfo  GetMenuItemInfoA
  4787. #endif // !UNICODE
  4788.  
  4789. WINUSERAPI
  4790. BOOL
  4791. WINAPI
  4792. SetMenuItemInfoA(
  4793.     HMENU,
  4794.     UINT,
  4795.     BOOL,
  4796.     LPCMENUITEMINFOA
  4797.     );
  4798. WINUSERAPI
  4799. BOOL
  4800. WINAPI
  4801. SetMenuItemInfoW(
  4802.     HMENU,
  4803.     UINT,
  4804.     BOOL,
  4805.     LPCMENUITEMINFOW
  4806.     );
  4807. #ifdef UNICODE
  4808. #define SetMenuItemInfo  SetMenuItemInfoW
  4809. #else
  4810. #define SetMenuItemInfo  SetMenuItemInfoA
  4811. #endif // !UNICODE
  4812.  
  4813.  
  4814. #define GMDI_USEDISABLED    0x0001L
  4815. #define GMDI_GOINTOPOPUPS   0x0002L
  4816.  
  4817. WINUSERAPI UINT    WINAPI GetMenuDefaultItem(HMENU hMenu, UINT fByPos, UINT gmdiFlags);
  4818. WINUSERAPI BOOL    WINAPI SetMenuDefaultItem(HMENU hMenu, UINT uItem, UINT fByPos);
  4819.  
  4820. WINUSERAPI BOOL    WINAPI GetMenuItemRect(HWND hWnd, HMENU hMenu, UINT uItem, LPRECT lprcItem);
  4821. WINUSERAPI int     WINAPI MenuItemFromPoint(HWND hWnd, HMENU hMenu, POINT ptScreen);
  4822. #endif /* WINVER >= 0x0400 */
  4823.  
  4824. /*
  4825.  * Flags for TrackPopupMenu
  4826.  */
  4827. #define TPM_LEFTBUTTON  0x0000L
  4828. #define TPM_RIGHTBUTTON 0x0002L
  4829. #define TPM_LEFTALIGN   0x0000L
  4830. #define TPM_CENTERALIGN 0x0004L
  4831. #define TPM_RIGHTALIGN  0x0008L
  4832. #if(WINVER >= 0x0400)
  4833. #define TPM_TOPALIGN        0x0000L
  4834. #define TPM_VCENTERALIGN    0x0010L
  4835. #define TPM_BOTTOMALIGN     0x0020L
  4836.  
  4837. #define TPM_HORIZONTAL      0x0000L     /* Horz alignment matters more */
  4838. #define TPM_VERTICAL        0x0040L     /* Vert alignment matters more */
  4839. #define TPM_NONOTIFY        0x0080L     /* Don't send any notification msgs */
  4840. #define TPM_RETURNCMD       0x0100L
  4841. #endif /* WINVER >= 0x0400 */
  4842.  
  4843.  
  4844. #endif /* !NOMENUS */
  4845.  
  4846.  
  4847. #if(WINVER >= 0x0400)
  4848. //
  4849. // Drag-and-drop support
  4850. //
  4851.  
  4852. typedef struct tagDROPSTRUCT
  4853. {
  4854.     HWND    hwndSource;
  4855.     HWND    hwndSink;
  4856.     DWORD   wFmt;
  4857.     DWORD   dwData;
  4858.     POINT   ptDrop;
  4859.     DWORD   dwControlData;
  4860. } DROPSTRUCT, *PDROPSTRUCT, *LPDROPSTRUCT;
  4861.  
  4862. #define DOF_EXECUTABLE      0x8001
  4863. #define DOF_DOCUMENT        0x8002
  4864. #define DOF_DIRECTORY       0x8003
  4865. #define DOF_MULTIPLE        0x8004
  4866. #define DOF_PROGMAN         0x0001
  4867. #define DOF_SHELLDATA       0x0002
  4868.  
  4869. #define DO_DROPFILE         0x454C4946L
  4870. #define DO_PRINTFILE        0x544E5250L
  4871.  
  4872. WINUSERAPI
  4873. DWORD
  4874. WINAPI
  4875. DragObject(HWND, HWND, UINT, DWORD, HCURSOR);
  4876.  
  4877. WINUSERAPI
  4878. BOOL
  4879. WINAPI
  4880. DragDetect(HWND, POINT);
  4881. #endif /* WINVER >= 0x0400 */
  4882.  
  4883. WINUSERAPI
  4884. BOOL
  4885. WINAPI
  4886. DrawIcon(
  4887.     HDC hDC,
  4888.     int X,
  4889.     int Y,
  4890.     HICON hIcon);
  4891.  
  4892. #ifndef NODRAWTEXT
  4893.  
  4894. /*
  4895.  * DrawText() Format Flags
  4896.  */
  4897. #define DT_TOP              0x00000000
  4898. #define DT_LEFT             0x00000000
  4899. #define DT_CENTER           0x00000001
  4900. #define DT_RIGHT            0x00000002
  4901. #define DT_VCENTER          0x00000004
  4902. #define DT_BOTTOM           0x00000008
  4903. #define DT_WORDBREAK        0x00000010
  4904. #define DT_SINGLELINE       0x00000020
  4905. #define DT_EXPANDTABS       0x00000040
  4906. #define DT_TABSTOP          0x00000080
  4907. #define DT_NOCLIP           0x00000100
  4908. #define DT_EXTERNALLEADING  0x00000200
  4909. #define DT_CALCRECT         0x00000400
  4910. #define DT_NOPREFIX         0x00000800
  4911. #define DT_INTERNAL         0x00001000
  4912.  
  4913. #if(WINVER >= 0x0400)
  4914. #define DT_EDITCONTROL      0x00002000
  4915. #define DT_PATH_ELLIPSIS    0x00004000
  4916. #define DT_END_ELLIPSIS     0x00008000
  4917. #define DT_MODIFYSTRING     0x00010000
  4918. #define DT_RTLREADING       0x00020000
  4919. #define DT_WORD_ELLIPSIS    0x00040000
  4920.  
  4921.  
  4922.  
  4923. typedef struct tagDRAWTEXTPARAMS
  4924. {
  4925.     UINT    cbSize;
  4926.     int     iTabLength;
  4927.     int     iLeftMargin;
  4928.     int     iRightMargin;
  4929.     UINT    uiLengthDrawn;
  4930. } DRAWTEXTPARAMS, FAR *LPDRAWTEXTPARAMS;
  4931. #endif /* WINVER >= 0x0400 */
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937. WINUSERAPI
  4938. int
  4939. WINAPI
  4940. DrawTextA(
  4941.     HDC hDC,
  4942.     LPCSTR lpString,
  4943.     int nCount,
  4944.     LPRECT lpRect,
  4945.     UINT uFormat);
  4946. WINUSERAPI
  4947. int
  4948. WINAPI
  4949. DrawTextW(
  4950.     HDC hDC,
  4951.     LPCWSTR lpString,
  4952.     int nCount,
  4953.     LPRECT lpRect,
  4954.     UINT uFormat);
  4955. #ifdef UNICODE
  4956. #define DrawText  DrawTextW
  4957. #else
  4958. #define DrawText  DrawTextA
  4959. #endif // !UNICODE
  4960.  
  4961.  
  4962. #if(WINVER >= 0x0400)
  4963. WINUSERAPI
  4964. int
  4965. WINAPI
  4966. DrawTextExA(HDC, LPSTR, int, LPRECT, UINT, LPDRAWTEXTPARAMS);
  4967. WINUSERAPI
  4968. int
  4969. WINAPI
  4970. DrawTextExW(HDC, LPWSTR, int, LPRECT, UINT, LPDRAWTEXTPARAMS);
  4971. #ifdef UNICODE
  4972. #define DrawTextEx  DrawTextExW
  4973. #else
  4974. #define DrawTextEx  DrawTextExA
  4975. #endif // !UNICODE
  4976. #endif /* WINVER >= 0x0400 */
  4977.  
  4978. #endif /* !NODRAWTEXT */
  4979.  
  4980. WINUSERAPI
  4981. BOOL
  4982. WINAPI
  4983. GrayStringA(
  4984.     HDC hDC,
  4985.     HBRUSH hBrush,
  4986.     GRAYSTRINGPROC lpOutputFunc,
  4987.     LPARAM lpData,
  4988.     int nCount,
  4989.     int X,
  4990.     int Y,
  4991.     int nWidth,
  4992.     int nHeight);
  4993. WINUSERAPI
  4994. BOOL
  4995. WINAPI
  4996. GrayStringW(
  4997.     HDC hDC,
  4998.     HBRUSH hBrush,
  4999.     GRAYSTRINGPROC lpOutputFunc,
  5000.     LPARAM lpData,
  5001.     int nCount,
  5002.     int X,
  5003.     int Y,
  5004.     int nWidth,
  5005.     int nHeight);
  5006. #ifdef UNICODE
  5007. #define GrayString  GrayStringW
  5008. #else
  5009. #define GrayString  GrayStringA
  5010. #endif // !UNICODE
  5011.  
  5012. #if(WINVER >= 0x0400)
  5013. /* Monolithic state-drawing routine */
  5014. /* Image type */
  5015. #define DST_COMPLEX     0x0000
  5016. #define DST_TEXT        0x0001
  5017. #define DST_PREFIXTEXT  0x0002
  5018. #define DST_ICON        0x0003
  5019. #define DST_BITMAP      0x0004
  5020.  
  5021. /* State type */
  5022. #define DSS_NORMAL      0x0000
  5023. #define DSS_UNION       0x0010  /* Gray string appearance */
  5024. #define DSS_DISABLED    0x0020
  5025. #define DSS_MONO        0x0080
  5026. #define DSS_RIGHT       0x8000
  5027.  
  5028. WINUSERAPI BOOL WINAPI DrawStateA(HDC, HBRUSH, DRAWSTATEPROC, LPARAM, WPARAM, int, int, int, int, UINT);
  5029. WINUSERAPI BOOL WINAPI DrawStateW(HDC, HBRUSH, DRAWSTATEPROC, LPARAM, WPARAM, int, int, int, int, UINT);
  5030. #ifdef UNICODE
  5031. #define DrawState  DrawStateW
  5032. #else
  5033. #define DrawState  DrawStateA
  5034. #endif // !UNICODE
  5035. #endif /* WINVER >= 0x0400 */
  5036.  
  5037.  
  5038. WINUSERAPI
  5039. LONG
  5040. WINAPI
  5041. TabbedTextOutA(
  5042.     HDC hDC,
  5043.     int X,
  5044.     int Y,
  5045.     LPCSTR lpString,
  5046.     int nCount,
  5047.     int nTabPositions,
  5048.     LPINT lpnTabStopPositions,
  5049.     int nTabOrigin);
  5050. WINUSERAPI
  5051. LONG
  5052. WINAPI
  5053. TabbedTextOutW(
  5054.     HDC hDC,
  5055.     int X,
  5056.     int Y,
  5057.     LPCWSTR lpString,
  5058.     int nCount,
  5059.     int nTabPositions,
  5060.     LPINT lpnTabStopPositions,
  5061.     int nTabOrigin);
  5062. #ifdef UNICODE
  5063. #define TabbedTextOut  TabbedTextOutW
  5064. #else
  5065. #define TabbedTextOut  TabbedTextOutA
  5066. #endif // !UNICODE
  5067.  
  5068. WINUSERAPI
  5069. DWORD
  5070. WINAPI
  5071. GetTabbedTextExtentA(
  5072.     HDC hDC,
  5073.     LPCSTR lpString,
  5074.     int nCount,
  5075.     int nTabPositions,
  5076.     LPINT lpnTabStopPositions);
  5077. WINUSERAPI
  5078. DWORD
  5079. WINAPI
  5080. GetTabbedTextExtentW(
  5081.     HDC hDC,
  5082.     LPCWSTR lpString,
  5083.     int nCount,
  5084.     int nTabPositions,
  5085.     LPINT lpnTabStopPositions);
  5086. #ifdef UNICODE
  5087. #define GetTabbedTextExtent  GetTabbedTextExtentW
  5088. #else
  5089. #define GetTabbedTextExtent  GetTabbedTextExtentA
  5090. #endif // !UNICODE
  5091.  
  5092. WINUSERAPI
  5093. BOOL
  5094. WINAPI
  5095. UpdateWindow(
  5096.     HWND hWnd);
  5097.  
  5098. WINUSERAPI
  5099. HWND
  5100. WINAPI
  5101. SetActiveWindow(
  5102.     HWND hWnd);
  5103.  
  5104. WINUSERAPI
  5105. HWND
  5106. WINAPI
  5107. GetForegroundWindow(
  5108.     VOID);
  5109.  
  5110. #if(WINVER >= 0x0400)
  5111. WINUSERAPI BOOL WINAPI PaintDesktop(HDC hdc);
  5112.  
  5113. #endif /* WINVER >= 0x0400 */
  5114.  
  5115. WINUSERAPI
  5116. BOOL
  5117. WINAPI
  5118. SetForegroundWindow(
  5119.     HWND hWnd);
  5120.  
  5121. WINUSERAPI
  5122. HWND
  5123. WINAPI
  5124. WindowFromDC(
  5125.     HDC hDC);
  5126.  
  5127. WINUSERAPI
  5128. HDC
  5129. WINAPI
  5130. GetDC(
  5131.     HWND hWnd);
  5132.  
  5133. WINUSERAPI
  5134. HDC
  5135. WINAPI
  5136. GetDCEx(
  5137.     HWND hWnd ,
  5138.     HRGN hrgnClip,
  5139.     DWORD flags);
  5140.  
  5141. /*
  5142.  * GetDCEx() flags
  5143.  */
  5144. #define DCX_WINDOW           0x00000001L
  5145. #define DCX_CACHE            0x00000002L
  5146. #define DCX_NORESETATTRS     0x00000004L
  5147. #define DCX_CLIPCHILDREN     0x00000008L
  5148. #define DCX_CLIPSIBLINGS     0x00000010L
  5149. #define DCX_PARENTCLIP       0x00000020L
  5150.  
  5151. #define DCX_EXCLUDERGN       0x00000040L
  5152. #define DCX_INTERSECTRGN     0x00000080L
  5153.  
  5154. #define DCX_EXCLUDEUPDATE    0x00000100L
  5155. #define DCX_INTERSECTUPDATE  0x00000200L
  5156.  
  5157. #define DCX_LOCKWINDOWUPDATE 0x00000400L
  5158.  
  5159. #define DCX_VALIDATE         0x00200000L
  5160.  
  5161.  
  5162.  
  5163.  
  5164. WINUSERAPI
  5165. HDC
  5166. WINAPI
  5167. GetWindowDC(
  5168.     HWND hWnd);
  5169.  
  5170. WINUSERAPI
  5171. int
  5172. WINAPI
  5173. ReleaseDC(
  5174.     HWND hWnd,
  5175.     HDC hDC);
  5176.  
  5177. WINUSERAPI
  5178. HDC
  5179. WINAPI
  5180. BeginPaint(
  5181.     HWND hWnd,
  5182.     LPPAINTSTRUCT lpPaint);
  5183.  
  5184. WINUSERAPI
  5185. BOOL
  5186. WINAPI
  5187. EndPaint(
  5188.     HWND hWnd,
  5189.     CONST PAINTSTRUCT *lpPaint);
  5190.  
  5191. WINUSERAPI
  5192. BOOL
  5193. WINAPI
  5194. GetUpdateRect(
  5195.     HWND hWnd,
  5196.     LPRECT lpRect,
  5197.     BOOL bErase);
  5198.  
  5199. WINUSERAPI
  5200. int
  5201. WINAPI
  5202. GetUpdateRgn(
  5203.     HWND hWnd,
  5204.     HRGN hRgn,
  5205.     BOOL bErase);
  5206.  
  5207. WINUSERAPI
  5208. int
  5209. WINAPI
  5210. SetWindowRgn(
  5211.     HWND hWnd,
  5212.     HRGN hRgn,
  5213.     BOOL bRedraw);
  5214.  
  5215. WINUSERAPI
  5216. int
  5217. WINAPI
  5218. GetWindowRgn(
  5219.     HWND hWnd,
  5220.     HRGN hRgn);
  5221.  
  5222. WINUSERAPI
  5223. int
  5224. WINAPI
  5225. ExcludeUpdateRgn(
  5226.     HDC hDC,
  5227.     HWND hWnd);
  5228.  
  5229. WINUSERAPI
  5230. BOOL
  5231. WINAPI
  5232. InvalidateRect(
  5233.     HWND hWnd ,
  5234.     CONST RECT *lpRect,
  5235.     BOOL bErase);
  5236.  
  5237. WINUSERAPI
  5238. BOOL
  5239. WINAPI
  5240. ValidateRect(
  5241.     HWND hWnd ,
  5242.     CONST RECT *lpRect);
  5243.  
  5244. WINUSERAPI
  5245. BOOL
  5246. WINAPI
  5247. InvalidateRgn(
  5248.     HWND hWnd,
  5249.     HRGN hRgn,
  5250.     BOOL bErase);
  5251.  
  5252. WINUSERAPI
  5253. BOOL
  5254. WINAPI
  5255. ValidateRgn(
  5256.     HWND hWnd,
  5257.     HRGN hRgn);
  5258.  
  5259.  
  5260. WINUSERAPI
  5261. BOOL
  5262. WINAPI
  5263. RedrawWindow(
  5264.     HWND hWnd,
  5265.     CONST RECT *lprcUpdate,
  5266.     HRGN hrgnUpdate,
  5267.     UINT flags);
  5268.  
  5269. /*
  5270.  * RedrawWindow() flags
  5271.  */
  5272. #define RDW_INVALIDATE          0x0001
  5273. #define RDW_INTERNALPAINT       0x0002
  5274. #define RDW_ERASE               0x0004
  5275.  
  5276. #define RDW_VALIDATE            0x0008
  5277. #define RDW_NOINTERNALPAINT     0x0010
  5278. #define RDW_NOERASE             0x0020
  5279.  
  5280. #define RDW_NOCHILDREN          0x0040
  5281. #define RDW_ALLCHILDREN         0x0080
  5282.  
  5283. #define RDW_UPDATENOW           0x0100
  5284. #define RDW_ERASENOW            0x0200
  5285.  
  5286. #define RDW_FRAME               0x0400
  5287. #define RDW_NOFRAME             0x0800
  5288.  
  5289.  
  5290.  
  5291. /*
  5292.  * LockWindowUpdate API
  5293.  */
  5294.  
  5295. WINUSERAPI
  5296. BOOL
  5297. WINAPI
  5298. LockWindowUpdate(
  5299.     HWND hWndLock);
  5300.  
  5301. WINUSERAPI
  5302. BOOL
  5303. WINAPI
  5304. ScrollWindow(
  5305.     HWND hWnd,
  5306.     int XAmount,
  5307.     int YAmount,
  5308.     CONST RECT *lpRect,
  5309.     CONST RECT *lpClipRect);
  5310.  
  5311. WINUSERAPI
  5312. BOOL
  5313. WINAPI
  5314. ScrollDC(
  5315.     HDC hDC,
  5316.     int dx,
  5317.     int dy,
  5318.     CONST RECT *lprcScroll,
  5319.     CONST RECT *lprcClip ,
  5320.     HRGN hrgnUpdate,
  5321.     LPRECT lprcUpdate);
  5322.  
  5323. WINUSERAPI
  5324. int
  5325. WINAPI
  5326. ScrollWindowEx(
  5327.     HWND hWnd,
  5328.     int dx,
  5329.     int dy,
  5330.     CONST RECT *prcScroll,
  5331.     CONST RECT *prcClip ,
  5332.     HRGN hrgnUpdate,
  5333.     LPRECT prcUpdate,
  5334.     UINT flags);
  5335.  
  5336. #define SW_SCROLLCHILDREN   0x0001  /* Scroll children within *lprcScroll. */
  5337. #define SW_INVALIDATE       0x0002  /* Invalidate after scrolling */
  5338. #define SW_ERASE            0x0004  /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  5339.  
  5340.  
  5341.  
  5342. #ifndef NOSCROLL
  5343.  
  5344. WINUSERAPI
  5345. int
  5346. WINAPI
  5347. SetScrollPos(
  5348.     HWND hWnd,
  5349.     int nBar,
  5350.     int nPos,
  5351.     BOOL bRedraw);
  5352.  
  5353. WINUSERAPI
  5354. int
  5355. WINAPI
  5356. GetScrollPos(
  5357.     HWND hWnd,
  5358.     int nBar);
  5359.  
  5360. WINUSERAPI
  5361. BOOL
  5362. WINAPI
  5363. SetScrollRange(
  5364.     HWND hWnd,
  5365.     int nBar,
  5366.     int nMinPos,
  5367.     int nMaxPos,
  5368.     BOOL bRedraw);
  5369.  
  5370. WINUSERAPI
  5371. BOOL
  5372. WINAPI
  5373. GetScrollRange(
  5374.     HWND hWnd,
  5375.     int nBar,
  5376.     LPINT lpMinPos,
  5377.     LPINT lpMaxPos);
  5378.  
  5379. WINUSERAPI
  5380. BOOL
  5381. WINAPI
  5382. ShowScrollBar(
  5383.     HWND hWnd,
  5384.     int wBar,
  5385.     BOOL bShow);
  5386.  
  5387. WINUSERAPI
  5388. BOOL
  5389. WINAPI
  5390. EnableScrollBar(
  5391.     HWND hWnd,
  5392.     UINT wSBflags,
  5393.     UINT wArrows);
  5394.  
  5395.  
  5396. /*
  5397.  * EnableScrollBar() flags
  5398.  */
  5399. #define ESB_ENABLE_BOTH     0x0000
  5400. #define ESB_DISABLE_BOTH    0x0003
  5401.  
  5402. #define ESB_DISABLE_LEFT    0x0001
  5403. #define ESB_DISABLE_RIGHT   0x0002
  5404.  
  5405. #define ESB_DISABLE_UP      0x0001
  5406. #define ESB_DISABLE_DOWN    0x0002
  5407.  
  5408. #define ESB_DISABLE_LTUP    ESB_DISABLE_LEFT
  5409. #define ESB_DISABLE_RTDN    ESB_DISABLE_RIGHT
  5410.  
  5411.  
  5412. #endif  /* !NOSCROLL */
  5413.  
  5414. WINUSERAPI
  5415. BOOL
  5416. WINAPI
  5417. SetPropA(
  5418.     HWND hWnd,
  5419.     LPCSTR lpString,
  5420.     HANDLE hData);
  5421. WINUSERAPI
  5422. BOOL
  5423. WINAPI
  5424. SetPropW(
  5425.     HWND hWnd,
  5426.     LPCWSTR lpString,
  5427.     HANDLE hData);
  5428. #ifdef UNICODE
  5429. #define SetProp  SetPropW
  5430. #else
  5431. #define SetProp  SetPropA
  5432. #endif // !UNICODE
  5433.  
  5434. WINUSERAPI
  5435. HANDLE
  5436. WINAPI
  5437. GetPropA(
  5438.     HWND hWnd,
  5439.     LPCSTR lpString);
  5440. WINUSERAPI
  5441. HANDLE
  5442. WINAPI
  5443. GetPropW(
  5444.     HWND hWnd,
  5445.     LPCWSTR lpString);
  5446. #ifdef UNICODE
  5447. #define GetProp  GetPropW
  5448. #else
  5449. #define GetProp  GetPropA
  5450. #endif // !UNICODE
  5451.  
  5452. WINUSERAPI
  5453. HANDLE
  5454. WINAPI
  5455. RemovePropA(
  5456.     HWND hWnd,
  5457.     LPCSTR lpString);
  5458. WINUSERAPI
  5459. HANDLE
  5460. WINAPI
  5461. RemovePropW(
  5462.     HWND hWnd,
  5463.     LPCWSTR lpString);
  5464. #ifdef UNICODE
  5465. #define RemoveProp  RemovePropW
  5466. #else
  5467. #define RemoveProp  RemovePropA
  5468. #endif // !UNICODE
  5469.  
  5470. WINUSERAPI
  5471. int
  5472. WINAPI
  5473. EnumPropsExA(
  5474.     HWND hWnd,
  5475.     PROPENUMPROCEXA lpEnumFunc,
  5476.     LPARAM lParam);
  5477. WINUSERAPI
  5478. int
  5479. WINAPI
  5480. EnumPropsExW(
  5481.     HWND hWnd,
  5482.     PROPENUMPROCEXW lpEnumFunc,
  5483.     LPARAM lParam);
  5484. #ifdef UNICODE
  5485. #define EnumPropsEx  EnumPropsExW
  5486. #else
  5487. #define EnumPropsEx  EnumPropsExA
  5488. #endif // !UNICODE
  5489.  
  5490. WINUSERAPI
  5491. int
  5492. WINAPI
  5493. EnumPropsA(
  5494.     HWND hWnd,
  5495.     PROPENUMPROCA lpEnumFunc);
  5496. WINUSERAPI
  5497. int
  5498. WINAPI
  5499. EnumPropsW(
  5500.     HWND hWnd,
  5501.     PROPENUMPROCW lpEnumFunc);
  5502. #ifdef UNICODE
  5503. #define EnumProps  EnumPropsW
  5504. #else
  5505. #define EnumProps  EnumPropsA
  5506. #endif // !UNICODE
  5507.  
  5508. WINUSERAPI
  5509. BOOL
  5510. WINAPI
  5511. SetWindowTextA(
  5512.     HWND hWnd,
  5513.     LPCSTR lpString);
  5514. WINUSERAPI
  5515. BOOL
  5516. WINAPI
  5517. SetWindowTextW(
  5518.     HWND hWnd,
  5519.     LPCWSTR lpString);
  5520. #ifdef UNICODE
  5521. #define SetWindowText  SetWindowTextW
  5522. #else
  5523. #define SetWindowText  SetWindowTextA
  5524. #endif // !UNICODE
  5525.  
  5526. WINUSERAPI
  5527. int
  5528. WINAPI
  5529. GetWindowTextA(
  5530.     HWND hWnd,
  5531.     LPSTR lpString,
  5532.     int nMaxCount);
  5533. WINUSERAPI
  5534. int
  5535. WINAPI
  5536. GetWindowTextW(
  5537.     HWND hWnd,
  5538.     LPWSTR lpString,
  5539.     int nMaxCount);
  5540. #ifdef UNICODE
  5541. #define GetWindowText  GetWindowTextW
  5542. #else
  5543. #define GetWindowText  GetWindowTextA
  5544. #endif // !UNICODE
  5545.  
  5546. WINUSERAPI
  5547. int
  5548. WINAPI
  5549. GetWindowTextLengthA(
  5550.     HWND hWnd);
  5551. WINUSERAPI
  5552. int
  5553. WINAPI
  5554. GetWindowTextLengthW(
  5555.     HWND hWnd);
  5556. #ifdef UNICODE
  5557. #define GetWindowTextLength  GetWindowTextLengthW
  5558. #else
  5559. #define GetWindowTextLength  GetWindowTextLengthA
  5560. #endif // !UNICODE
  5561.  
  5562. WINUSERAPI
  5563. BOOL
  5564. WINAPI
  5565. GetClientRect(
  5566.     HWND hWnd,
  5567.     LPRECT lpRect);
  5568.  
  5569. WINUSERAPI
  5570. BOOL
  5571. WINAPI
  5572. GetWindowRect(
  5573.     HWND hWnd,
  5574.     LPRECT lpRect);
  5575.  
  5576. WINUSERAPI
  5577. BOOL
  5578. WINAPI
  5579. AdjustWindowRect(
  5580.     LPRECT lpRect,
  5581.     DWORD dwStyle,
  5582.     BOOL bMenu);
  5583.  
  5584. WINUSERAPI
  5585. BOOL
  5586. WINAPI
  5587. AdjustWindowRectEx(
  5588.     LPRECT lpRect,
  5589.     DWORD dwStyle,
  5590.     BOOL bMenu,
  5591.     DWORD dwExStyle);
  5592.  
  5593. #if(WINVER >= 0x0400)
  5594. #define HELPINFO_WINDOW    0x0001
  5595. #define HELPINFO_MENUITEM  0x0002
  5596. typedef struct tagHELPINFO      /* Structure pointed to by lParam of WM_HELP */
  5597. {
  5598.     UINT    cbSize;             /* Size in bytes of this struct  */
  5599.     int     iContextType;       /* Either HELPINFO_WINDOW or HELPINFO_MENUITEM */
  5600.     int     iCtrlId;            /* Control Id or a Menu item Id. */
  5601.     HANDLE  hItemHandle;        /* hWnd of control or hMenu.     */
  5602.     DWORD   dwContextId;        /* Context Id associated with this item */
  5603.     POINT   MousePos;           /* Mouse Position in screen co-ordinates */
  5604. }  HELPINFO, FAR *LPHELPINFO;
  5605.  
  5606. WINUSERAPI BOOL  WINAPI  SetWindowContextHelpId(HWND, DWORD);
  5607. WINUSERAPI DWORD WINAPI  GetWindowContextHelpId(HWND);
  5608. WINUSERAPI BOOL  WINAPI  SetMenuContextHelpId(HMENU, DWORD);
  5609. WINUSERAPI DWORD WINAPI  GetMenuContextHelpId(HMENU);
  5610.  
  5611. #endif /* WINVER >= 0x0400 */
  5612.  
  5613.  
  5614.  
  5615. #ifndef NOMB
  5616.  
  5617. /*
  5618.  * MessageBox() Flags
  5619.  */
  5620. #define MB_OK                       0x00000000L
  5621. #define MB_OKCANCEL                 0x00000001L
  5622. #define MB_ABORTRETRYIGNORE         0x00000002L
  5623. #define MB_YESNOCANCEL              0x00000003L
  5624. #define MB_YESNO                    0x00000004L
  5625. #define MB_RETRYCANCEL              0x00000005L
  5626.  
  5627.  
  5628. #define MB_ICONHAND                 0x00000010L
  5629. #define MB_ICONQUESTION             0x00000020L
  5630. #define MB_ICONEXCLAMATION          0x00000030L
  5631. #define MB_ICONASTERISK             0x00000040L
  5632.  
  5633. #if(WINVER >= 0x0400)
  5634. #define MB_USERICON                 0x00000080L
  5635. #define MB_ICONWARNING              MB_ICONEXCLAMATION
  5636. #define MB_ICONERROR                MB_ICONHAND
  5637. #endif /* WINVER >= 0x0400 */
  5638.  
  5639. #define MB_ICONINFORMATION          MB_ICONASTERISK
  5640. #define MB_ICONSTOP                 MB_ICONHAND
  5641.  
  5642. #define MB_DEFBUTTON1               0x00000000L
  5643. #define MB_DEFBUTTON2               0x00000100L
  5644. #define MB_DEFBUTTON3               0x00000200L
  5645. #if(WINVER >= 0x0400)
  5646. #define MB_DEFBUTTON4               0x00000300L
  5647. #endif /* WINVER >= 0x0400 */
  5648.  
  5649. #define MB_APPLMODAL                0x00000000L
  5650. #define MB_SYSTEMMODAL              0x00001000L
  5651. #define MB_TASKMODAL                0x00002000L
  5652. #if(WINVER >= 0x0400)
  5653. #define MB_HELP                     0x00004000L // Help Button
  5654. #endif /* WINVER >= 0x0400 */
  5655.  
  5656. #define MB_NOFOCUS                  0x00008000L
  5657. #define MB_SETFOREGROUND            0x00010000L
  5658. #define MB_DEFAULT_DESKTOP_ONLY     0x00020000L
  5659.  
  5660. #if(WINVER >= 0x0400)
  5661. #define MB_TOPMOST                  0x00040000L
  5662. #define MB_RIGHT                    0x00080000L
  5663. #define MB_RTLREADING               0x00100000L
  5664.  
  5665.  
  5666. #endif /* WINVER >= 0x0400 */
  5667.  
  5668.  
  5669. #ifdef _WIN32_WINNT
  5670. #if (_WIN32_WINNT >= 0x0400)
  5671. #define MB_SERVICE_NOTIFICATION          0x00200000L
  5672. #else
  5673. #define MB_SERVICE_NOTIFICATION          0x00040000L
  5674. #endif
  5675. #define MB_SERVICE_NOTIFICATION_NT3X     0x00040000L
  5676. #endif
  5677.  
  5678. #define MB_TYPEMASK                 0x0000000FL
  5679. #define MB_ICONMASK                 0x000000F0L
  5680. #define MB_DEFMASK                  0x00000F00L
  5681. #define MB_MODEMASK                 0x00003000L
  5682. #define MB_MISCMASK                 0x0000C000L
  5683.  
  5684. WINUSERAPI
  5685. int
  5686. WINAPI
  5687. MessageBoxA(
  5688.     HWND hWnd ,
  5689.     LPCSTR lpText,
  5690.     LPCSTR lpCaption,
  5691.     UINT uType);
  5692. WINUSERAPI
  5693. int
  5694. WINAPI
  5695. MessageBoxW(
  5696.     HWND hWnd ,
  5697.     LPCWSTR lpText,
  5698.     LPCWSTR lpCaption,
  5699.     UINT uType);
  5700. #ifdef UNICODE
  5701. #define MessageBox  MessageBoxW
  5702. #else
  5703. #define MessageBox  MessageBoxA
  5704. #endif // !UNICODE
  5705.  
  5706. WINUSERAPI
  5707. int
  5708. WINAPI
  5709. MessageBoxExA(
  5710.     HWND hWnd ,
  5711.     LPCSTR lpText,
  5712.     LPCSTR lpCaption,
  5713.     UINT uType,
  5714.     WORD wLanguageId);
  5715. WINUSERAPI
  5716. int
  5717. WINAPI
  5718. MessageBoxExW(
  5719.     HWND hWnd ,
  5720.     LPCWSTR lpText,
  5721.     LPCWSTR lpCaption,
  5722.     UINT uType,
  5723.     WORD wLanguageId);
  5724. #ifdef UNICODE
  5725. #define MessageBoxEx  MessageBoxExW
  5726. #else
  5727. #define MessageBoxEx  MessageBoxExA
  5728. #endif // !UNICODE
  5729.  
  5730. #if(WINVER >= 0x0400)
  5731.  
  5732. typedef void (CALLBACK *MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo);
  5733.  
  5734. typedef struct tagMSGBOXPARAMSA
  5735. {
  5736.     UINT        cbSize;
  5737.     HWND        hwndOwner;
  5738.     HINSTANCE   hInstance;
  5739.     LPCSTR      lpszText;
  5740.     LPCSTR      lpszCaption;
  5741.     DWORD       dwStyle;
  5742.     LPCSTR      lpszIcon;
  5743.     DWORD       dwContextHelpId;
  5744.     MSGBOXCALLBACK      lpfnMsgBoxCallback;
  5745.     DWORD   dwLanguageId;
  5746. } MSGBOXPARAMSA, *PMSGBOXPARAMSA, *LPMSGBOXPARAMSA;
  5747. typedef struct tagMSGBOXPARAMSW
  5748. {
  5749.     UINT        cbSize;
  5750.     HWND        hwndOwner;
  5751.     HINSTANCE   hInstance;
  5752.     LPCWSTR     lpszText;
  5753.     LPCWSTR     lpszCaption;
  5754.     DWORD       dwStyle;
  5755.     LPCWSTR     lpszIcon;
  5756.     DWORD       dwContextHelpId;
  5757.     MSGBOXCALLBACK      lpfnMsgBoxCallback;
  5758.     DWORD   dwLanguageId;
  5759. } MSGBOXPARAMSW, *PMSGBOXPARAMSW, *LPMSGBOXPARAMSW;
  5760. #ifdef UNICODE
  5761. typedef MSGBOXPARAMSW MSGBOXPARAMS;
  5762. typedef PMSGBOXPARAMSW PMSGBOXPARAMS;
  5763. typedef LPMSGBOXPARAMSW LPMSGBOXPARAMS;
  5764. #else
  5765. typedef MSGBOXPARAMSA MSGBOXPARAMS;
  5766. typedef PMSGBOXPARAMSA PMSGBOXPARAMS;
  5767. typedef LPMSGBOXPARAMSA LPMSGBOXPARAMS;
  5768. #endif // UNICODE
  5769.  
  5770.  
  5771. WINUSERAPI int     WINAPI MessageBoxIndirectA(LPMSGBOXPARAMSA);
  5772. WINUSERAPI int     WINAPI MessageBoxIndirectW(LPMSGBOXPARAMSW);
  5773. #ifdef UNICODE
  5774. #define MessageBoxIndirect  MessageBoxIndirectW
  5775. #else
  5776. #define MessageBoxIndirect  MessageBoxIndirectA
  5777. #endif // !UNICODE
  5778. #endif /* WINVER >= 0x0400 */
  5779.  
  5780.  
  5781.  
  5782. WINUSERAPI
  5783. BOOL
  5784. WINAPI
  5785. MessageBeep(
  5786.     UINT uType);
  5787.  
  5788. #endif /* !NOMB */
  5789.  
  5790. WINUSERAPI
  5791. int
  5792. WINAPI
  5793. ShowCursor(
  5794.     BOOL bShow);
  5795.  
  5796. WINUSERAPI
  5797. BOOL
  5798. WINAPI
  5799. SetCursorPos(
  5800.     int X,
  5801.     int Y);
  5802.  
  5803. WINUSERAPI
  5804. HCURSOR
  5805. WINAPI
  5806. SetCursor(
  5807.     HCURSOR hCursor);
  5808.  
  5809. WINUSERAPI
  5810. BOOL
  5811. WINAPI
  5812. GetCursorPos(
  5813.     LPPOINT lpPoint);
  5814.  
  5815. WINUSERAPI
  5816. BOOL
  5817. WINAPI
  5818. ClipCursor(
  5819.     CONST RECT *lpRect);
  5820.  
  5821. WINUSERAPI
  5822. BOOL
  5823. WINAPI
  5824. GetClipCursor(
  5825.     LPRECT lpRect);
  5826.  
  5827. WINUSERAPI
  5828. HCURSOR
  5829. WINAPI
  5830. GetCursor(
  5831.     VOID);
  5832.  
  5833. WINUSERAPI
  5834. BOOL
  5835. WINAPI
  5836. CreateCaret(
  5837.     HWND hWnd,
  5838.     HBITMAP hBitmap ,
  5839.     int nWidth,
  5840.     int nHeight);
  5841.  
  5842. WINUSERAPI
  5843. UINT
  5844. WINAPI
  5845. GetCaretBlinkTime(
  5846.     VOID);
  5847.  
  5848. WINUSERAPI
  5849. BOOL
  5850. WINAPI
  5851. SetCaretBlinkTime(
  5852.     UINT uMSeconds);
  5853.  
  5854. WINUSERAPI
  5855. BOOL
  5856. WINAPI
  5857. DestroyCaret(
  5858.     VOID);
  5859.  
  5860. WINUSERAPI
  5861. BOOL
  5862. WINAPI
  5863. HideCaret(
  5864.     HWND hWnd);
  5865.  
  5866. WINUSERAPI
  5867. BOOL
  5868. WINAPI
  5869. ShowCaret(
  5870.     HWND hWnd);
  5871.  
  5872. WINUSERAPI
  5873. BOOL
  5874. WINAPI
  5875. SetCaretPos(
  5876.     int X,
  5877.     int Y);
  5878.  
  5879. WINUSERAPI
  5880. BOOL
  5881. WINAPI
  5882. GetCaretPos(
  5883.     LPPOINT lpPoint);
  5884.  
  5885. WINUSERAPI
  5886. BOOL
  5887. WINAPI
  5888. ClientToScreen(
  5889.     HWND hWnd,
  5890.     LPPOINT lpPoint);
  5891.  
  5892. WINUSERAPI
  5893. BOOL
  5894. WINAPI
  5895. ScreenToClient(
  5896.     HWND hWnd,
  5897.     LPPOINT lpPoint);
  5898.  
  5899. WINUSERAPI
  5900. int
  5901. WINAPI
  5902. MapWindowPoints(
  5903.     HWND hWndFrom,
  5904.     HWND hWndTo,
  5905.     LPPOINT lpPoints,
  5906.     UINT cPoints);
  5907.  
  5908. WINUSERAPI
  5909. HWND
  5910. WINAPI
  5911. WindowFromPoint(
  5912.     POINT Point);
  5913.  
  5914. WINUSERAPI
  5915. HWND
  5916. WINAPI
  5917. ChildWindowFromPoint(
  5918.     HWND hWndParent,
  5919.     POINT Point);
  5920.  
  5921. #if(WINVER >= 0x0400)
  5922. #define CWP_ALL             0x0000
  5923. #define CWP_SKIPINVISIBLE   0x0001
  5924. #define CWP_SKIPDISABLED    0x0002
  5925. #define CWP_SKIPTRANSPARENT 0x0004
  5926.  
  5927. WINUSERAPI HWND    WINAPI ChildWindowFromPointEx(HWND, POINT, UINT);
  5928. #endif /* WINVER >= 0x0400 */
  5929.  
  5930. #ifndef NOCOLOR
  5931.  
  5932. /*
  5933.  * Color Types
  5934.  */
  5935. #define CTLCOLOR_MSGBOX         0
  5936. #define CTLCOLOR_EDIT           1
  5937. #define CTLCOLOR_LISTBOX        2
  5938. #define CTLCOLOR_BTN            3
  5939. #define CTLCOLOR_DLG            4
  5940. #define CTLCOLOR_SCROLLBAR      5
  5941. #define CTLCOLOR_STATIC         6
  5942. #define CTLCOLOR_MAX            7
  5943.  
  5944. #define COLOR_SCROLLBAR         0
  5945. #define COLOR_BACKGROUND        1
  5946. #define COLOR_ACTIVECAPTION     2
  5947. #define COLOR_INACTIVECAPTION   3
  5948. #define COLOR_MENU              4
  5949. #define COLOR_WINDOW            5
  5950. #define COLOR_WINDOWFRAME       6
  5951. #define COLOR_MENUTEXT          7
  5952. #define COLOR_WINDOWTEXT        8
  5953. #define COLOR_CAPTIONTEXT       9
  5954. #define COLOR_ACTIVEBORDER      10
  5955. #define COLOR_INACTIVEBORDER    11
  5956. #define COLOR_APPWORKSPACE      12
  5957. #define COLOR_HIGHLIGHT         13
  5958. #define COLOR_HIGHLIGHTTEXT     14
  5959. #define COLOR_BTNFACE           15
  5960. #define COLOR_BTNSHADOW         16
  5961. #define COLOR_GRAYTEXT          17
  5962. #define COLOR_BTNTEXT           18
  5963. #define COLOR_INACTIVECAPTIONTEXT 19
  5964. #define COLOR_BTNHIGHLIGHT      20
  5965.  
  5966. #if(WINVER >= 0x0400)
  5967. #define COLOR_3DDKSHADOW        21
  5968. #define COLOR_3DLIGHT           22
  5969. #define COLOR_INFOTEXT          23
  5970. #define COLOR_INFOBK            24
  5971.  
  5972. #define COLOR_DESKTOP           COLOR_BACKGROUND
  5973. #define COLOR_3DFACE            COLOR_BTNFACE
  5974. #define COLOR_3DSHADOW          COLOR_BTNSHADOW
  5975. #define COLOR_3DHIGHLIGHT       COLOR_BTNHIGHLIGHT
  5976. #define COLOR_3DHILIGHT         COLOR_BTNHIGHLIGHT
  5977. #define COLOR_BTNHILIGHT        COLOR_BTNHIGHLIGHT
  5978. #endif /* WINVER >= 0x0400 */
  5979.  
  5980.  
  5981. WINUSERAPI
  5982. DWORD
  5983. WINAPI
  5984. GetSysColor(
  5985.     int nIndex);
  5986.  
  5987. #if(WINVER >= 0x0400)
  5988. WINUSERAPI
  5989. HBRUSH
  5990. WINAPI
  5991. GetSysColorBrush(
  5992.     int nIndex);
  5993.  
  5994.  
  5995. #endif /* WINVER >= 0x0400 */
  5996.  
  5997. WINUSERAPI
  5998. BOOL
  5999. WINAPI
  6000. SetSysColors(
  6001.     int cElements,
  6002.     CONST INT * lpaElements,
  6003.     CONST COLORREF * lpaRgbValues);
  6004.  
  6005. #endif /* !NOCOLOR */
  6006.  
  6007. WINUSERAPI
  6008. BOOL
  6009. WINAPI
  6010. DrawFocusRect(
  6011.     HDC hDC,
  6012.     CONST RECT * lprc);
  6013.  
  6014. WINUSERAPI
  6015. int
  6016. WINAPI
  6017. FillRect(
  6018.     HDC hDC,
  6019.     CONST RECT *lprc,
  6020.     HBRUSH hbr);
  6021.  
  6022. WINUSERAPI
  6023. int
  6024. WINAPI
  6025. FrameRect(
  6026.     HDC hDC,
  6027.     CONST RECT *lprc,
  6028.     HBRUSH hbr);
  6029.  
  6030. WINUSERAPI
  6031. BOOL
  6032. WINAPI
  6033. InvertRect(
  6034.     HDC hDC,
  6035.     CONST RECT *lprc);
  6036.  
  6037. WINUSERAPI
  6038. BOOL
  6039. WINAPI
  6040. SetRect(
  6041.     LPRECT lprc,
  6042.     int xLeft,
  6043.     int yTop,
  6044.     int xRight,
  6045.     int yBottom);
  6046.  
  6047. WINUSERAPI
  6048. BOOL
  6049. WINAPI
  6050.     SetRectEmpty(
  6051.     LPRECT lprc);
  6052.  
  6053. WINUSERAPI
  6054. BOOL
  6055. WINAPI
  6056. CopyRect(
  6057.     LPRECT lprcDst,
  6058.     CONST RECT *lprcSrc);
  6059.  
  6060. WINUSERAPI
  6061. BOOL
  6062. WINAPI
  6063. InflateRect(
  6064.     LPRECT lprc,
  6065.     int dx,
  6066.     int dy);
  6067.  
  6068. WINUSERAPI
  6069. BOOL
  6070. WINAPI
  6071. IntersectRect(
  6072.     LPRECT lprcDst,
  6073.     CONST RECT *lprcSrc1,
  6074.     CONST RECT *lprcSrc2);
  6075.  
  6076. WINUSERAPI
  6077. BOOL
  6078. WINAPI
  6079. UnionRect(
  6080.     LPRECT lprcDst,
  6081.     CONST RECT *lprcSrc1,
  6082.     CONST RECT *lprcSrc2);
  6083.  
  6084. WINUSERAPI
  6085. BOOL
  6086. WINAPI
  6087. SubtractRect(
  6088.     LPRECT lprcDst,
  6089.     CONST RECT *lprcSrc1,
  6090.     CONST RECT *lprcSrc2);
  6091.  
  6092. WINUSERAPI
  6093. BOOL
  6094. WINAPI
  6095. OffsetRect(
  6096.     LPRECT lprc,
  6097.     int dx,
  6098.     int dy);
  6099.  
  6100. WINUSERAPI
  6101. BOOL
  6102. WINAPI
  6103. IsRectEmpty(
  6104.     CONST RECT *lprc);
  6105.  
  6106. WINUSERAPI
  6107. BOOL
  6108. WINAPI
  6109. EqualRect(
  6110.     CONST RECT *lprc1,
  6111.     CONST RECT *lprc2);
  6112.  
  6113. WINUSERAPI
  6114. BOOL
  6115. WINAPI
  6116. PtInRect(
  6117.     CONST RECT *lprc,
  6118.     POINT pt);
  6119.  
  6120. #ifndef NOWINOFFSETS
  6121.  
  6122. WINUSERAPI
  6123. WORD
  6124. WINAPI
  6125. GetWindowWord(
  6126.     HWND hWnd,
  6127.     int nIndex);
  6128.  
  6129. WINUSERAPI
  6130. WORD
  6131. WINAPI
  6132. SetWindowWord(
  6133.     HWND hWnd,
  6134.     int nIndex,
  6135.     WORD wNewWord);
  6136.  
  6137. WINUSERAPI
  6138. LONG
  6139. WINAPI
  6140. GetWindowLongA(
  6141.     HWND hWnd,
  6142.     int nIndex);
  6143. WINUSERAPI
  6144. LONG
  6145. WINAPI
  6146. GetWindowLongW(
  6147.     HWND hWnd,
  6148.     int nIndex);
  6149. #ifdef UNICODE
  6150. #define GetWindowLong  GetWindowLongW
  6151. #else
  6152. #define GetWindowLong  GetWindowLongA
  6153. #endif // !UNICODE
  6154.  
  6155. WINUSERAPI
  6156. LONG
  6157. WINAPI
  6158. SetWindowLongA(
  6159.     HWND hWnd,
  6160.     int nIndex,
  6161.     LONG dwNewLong);
  6162. WINUSERAPI
  6163. LONG
  6164. WINAPI
  6165. SetWindowLongW(
  6166.     HWND hWnd,
  6167.     int nIndex,
  6168.     LONG dwNewLong);
  6169. #ifdef UNICODE
  6170. #define SetWindowLong  SetWindowLongW
  6171. #else
  6172. #define SetWindowLong  SetWindowLongA
  6173. #endif // !UNICODE
  6174.  
  6175. WINUSERAPI
  6176. WORD
  6177. WINAPI
  6178. GetClassWord(
  6179.     HWND hWnd,
  6180.     int nIndex);
  6181.  
  6182. WINUSERAPI
  6183. WORD
  6184. WINAPI
  6185. SetClassWord(
  6186.     HWND hWnd,
  6187.     int nIndex,
  6188.     WORD wNewWord);
  6189.  
  6190. WINUSERAPI
  6191. DWORD
  6192. WINAPI
  6193. GetClassLongA(
  6194.     HWND hWnd,
  6195.     int nIndex);
  6196. WINUSERAPI
  6197. DWORD
  6198. WINAPI
  6199. GetClassLongW(
  6200.     HWND hWnd,
  6201.     int nIndex);
  6202. #ifdef UNICODE
  6203. #define GetClassLong  GetClassLongW
  6204. #else
  6205. #define GetClassLong  GetClassLongA
  6206. #endif // !UNICODE
  6207.  
  6208. WINUSERAPI
  6209. DWORD
  6210. WINAPI
  6211. SetClassLongA(
  6212.     HWND hWnd,
  6213.     int nIndex,
  6214.     LONG dwNewLong);
  6215. WINUSERAPI
  6216. DWORD
  6217. WINAPI
  6218. SetClassLongW(
  6219.     HWND hWnd,
  6220.     int nIndex,
  6221.     LONG dwNewLong);
  6222. #ifdef UNICODE
  6223. #define SetClassLong  SetClassLongW
  6224. #else
  6225. #define SetClassLong  SetClassLongA
  6226. #endif // !UNICODE
  6227.  
  6228. #endif /* !NOWINOFFSETS */
  6229.  
  6230. WINUSERAPI
  6231. HWND
  6232. WINAPI
  6233. GetDesktopWindow(
  6234.     VOID);
  6235.  
  6236.  
  6237. WINUSERAPI
  6238. HWND
  6239. WINAPI
  6240. GetParent(
  6241.     HWND hWnd);
  6242.  
  6243. WINUSERAPI
  6244. HWND
  6245. WINAPI
  6246. SetParent(
  6247.     HWND hWndChild,
  6248.     HWND hWndNewParent);
  6249.  
  6250. WINUSERAPI
  6251. BOOL
  6252. WINAPI
  6253. EnumChildWindows(
  6254.     HWND hWndParent,
  6255.     WNDENUMPROC lpEnumFunc,
  6256.     LPARAM lParam);
  6257.  
  6258. WINUSERAPI
  6259. HWND
  6260. WINAPI
  6261. FindWindowA(
  6262.     LPCSTR lpClassName ,
  6263.     LPCSTR lpWindowName);
  6264. WINUSERAPI
  6265. HWND
  6266. WINAPI
  6267. FindWindowW(
  6268.     LPCWSTR lpClassName ,
  6269.     LPCWSTR lpWindowName);
  6270. #ifdef UNICODE
  6271. #define FindWindow  FindWindowW
  6272. #else
  6273. #define FindWindow  FindWindowA
  6274. #endif // !UNICODE
  6275.  
  6276. #if(WINVER >= 0x0400)
  6277. WINUSERAPI HWND    WINAPI FindWindowExA(HWND, HWND, LPCSTR, LPCSTR);
  6278. WINUSERAPI HWND    WINAPI FindWindowExW(HWND, HWND, LPCWSTR, LPCWSTR);
  6279. #ifdef UNICODE
  6280. #define FindWindowEx  FindWindowExW
  6281. #else
  6282. #define FindWindowEx  FindWindowExA
  6283. #endif // !UNICODE
  6284.  
  6285. #endif /* WINVER >= 0x0400 */
  6286.  
  6287.  
  6288. WINUSERAPI
  6289. BOOL
  6290. WINAPI
  6291. EnumWindows(
  6292.     WNDENUMPROC lpEnumFunc,
  6293.     LPARAM lParam);
  6294.  
  6295. WINUSERAPI
  6296. BOOL
  6297. WINAPI
  6298. EnumThreadWindows(
  6299.     DWORD dwThreadId,
  6300.     WNDENUMPROC lpfn,
  6301.     LPARAM lParam);
  6302.  
  6303. #define EnumTaskWindows(hTask, lpfn, lParam) EnumThreadWindows((DWORD)hTask, lpfn, lParam)
  6304.  
  6305. WINUSERAPI
  6306. int
  6307. WINAPI
  6308. GetClassNameA(
  6309.     HWND hWnd,
  6310.     LPSTR lpClassName,
  6311.     int nMaxCount);
  6312. WINUSERAPI
  6313. int
  6314. WINAPI
  6315. GetClassNameW(
  6316.     HWND hWnd,
  6317.     LPWSTR lpClassName,
  6318.     int nMaxCount);
  6319. #ifdef UNICODE
  6320. #define GetClassName  GetClassNameW
  6321. #else
  6322. #define GetClassName  GetClassNameA
  6323. #endif // !UNICODE
  6324.  
  6325. WINUSERAPI
  6326. HWND
  6327. WINAPI
  6328. GetTopWindow(
  6329.     HWND hWnd);
  6330.  
  6331. #define GetNextWindow(hWnd, wCmd) GetWindow(hWnd, wCmd)
  6332. #define GetSysModalWindow() (NULL)
  6333. #define SetSysModalWindow(hWnd) (NULL)
  6334.  
  6335. WINUSERAPI
  6336. DWORD
  6337. WINAPI
  6338. GetWindowThreadProcessId(
  6339.     HWND hWnd,
  6340.     LPDWORD lpdwProcessId);
  6341.  
  6342. #define GetWindowTask(hWnd) \
  6343.         ((HANDLE)GetWindowThreadProcessId(hWnd, NULL))
  6344.  
  6345. WINUSERAPI
  6346. HWND
  6347. WINAPI
  6348. GetLastActivePopup(
  6349.     HWND hWnd);
  6350.  
  6351. /*
  6352.  * GetWindow() Constants
  6353.  */
  6354. #define GW_HWNDFIRST        0
  6355. #define GW_HWNDLAST         1
  6356. #define GW_HWNDNEXT         2
  6357. #define GW_HWNDPREV         3
  6358. #define GW_OWNER            4
  6359. #define GW_CHILD            5
  6360. #define GW_MAX              5
  6361.  
  6362. WINUSERAPI
  6363. HWND
  6364. WINAPI
  6365. GetWindow(
  6366.     HWND hWnd,
  6367.     UINT uCmd);
  6368.  
  6369.  
  6370.  
  6371. #ifndef NOWH
  6372.  
  6373. #ifdef STRICT
  6374.  
  6375. WINUSERAPI
  6376. HHOOK
  6377. WINAPI
  6378. SetWindowsHookA(
  6379.     int nFilterType,
  6380.     HOOKPROC pfnFilterProc);
  6381. WINUSERAPI
  6382. HHOOK
  6383. WINAPI
  6384. SetWindowsHookW(
  6385.     int nFilterType,
  6386.     HOOKPROC pfnFilterProc);
  6387. #ifdef UNICODE
  6388. #define SetWindowsHook  SetWindowsHookW
  6389. #else
  6390. #define SetWindowsHook  SetWindowsHookA
  6391. #endif // !UNICODE
  6392.  
  6393. #else /* !STRICT */
  6394.  
  6395. WINUSERAPI
  6396. HOOKPROC
  6397. WINAPI
  6398. SetWindowsHookA(
  6399.     int nFilterType,
  6400.     HOOKPROC pfnFilterProc);
  6401. WINUSERAPI
  6402. HOOKPROC
  6403. WINAPI
  6404. SetWindowsHookW(
  6405.     int nFilterType,
  6406.     HOOKPROC pfnFilterProc);
  6407. #ifdef UNICODE
  6408. #define SetWindowsHook  SetWindowsHookW
  6409. #else
  6410. #define SetWindowsHook  SetWindowsHookA
  6411. #endif // !UNICODE
  6412.  
  6413. #endif /* !STRICT */
  6414.  
  6415. WINUSERAPI
  6416. BOOL
  6417. WINAPI
  6418. UnhookWindowsHook(
  6419.     int nCode,
  6420.     HOOKPROC pfnFilterProc);
  6421.  
  6422. WINUSERAPI
  6423. HHOOK
  6424. WINAPI
  6425. SetWindowsHookExA(
  6426.     int idHook,
  6427.     HOOKPROC lpfn,
  6428.     HINSTANCE hmod,
  6429.     DWORD dwThreadId);
  6430. WINUSERAPI
  6431. HHOOK
  6432. WINAPI
  6433. SetWindowsHookExW(
  6434.     int idHook,
  6435.     HOOKPROC lpfn,
  6436.     HINSTANCE hmod,
  6437.     DWORD dwThreadId);
  6438. #ifdef UNICODE
  6439. #define SetWindowsHookEx  SetWindowsHookExW
  6440. #else
  6441. #define SetWindowsHookEx  SetWindowsHookExA
  6442. #endif // !UNICODE
  6443.  
  6444. WINUSERAPI
  6445. BOOL
  6446. WINAPI
  6447. UnhookWindowsHookEx(
  6448.     HHOOK hhk);
  6449.  
  6450. WINUSERAPI
  6451. LRESULT
  6452. WINAPI
  6453. CallNextHookEx(
  6454.     HHOOK hhk,
  6455.     int nCode,
  6456.     WPARAM wParam,
  6457.     LPARAM lParam);
  6458.  
  6459. /*
  6460.  * Macros for source-level compatibility with old functions.
  6461.  */
  6462. #ifdef STRICT
  6463. #define DefHookProc(nCode, wParam, lParam, phhk)\
  6464.         CallNextHookEx(*phhk, nCode, wParam, lParam)
  6465. #else
  6466. #define DefHookProc(nCode, wParam, lParam, phhk)\
  6467.         CallNextHookEx((HHOOK)*phhk, nCode, wParam, lParam)
  6468. #endif /* STRICT */
  6469.  
  6470. #endif /* !NOWH */
  6471.  
  6472. #ifndef NOMENUS
  6473.  
  6474. // begin_r_winuser
  6475.  
  6476. /* ;win40  -- A lot of MF_* flags have been renamed as MFT_* and MFS_* flags */
  6477. /*
  6478.  * Menu flags for Add/Check/EnableMenuItem()
  6479.  */
  6480. #define MF_INSERT           0x00000000L
  6481. #define MF_CHANGE           0x00000080L
  6482. #define MF_APPEND           0x00000100L
  6483. #define MF_DELETE           0x00000200L
  6484. #define MF_REMOVE           0x00001000L
  6485.  
  6486. #define MF_BYCOMMAND        0x00000000L
  6487. #define MF_BYPOSITION       0x00000400L
  6488.  
  6489. #define MF_SEPARATOR        0x00000800L
  6490.  
  6491. #define MF_ENABLED          0x00000000L
  6492. #define MF_GRAYED           0x00000001L
  6493. #define MF_DISABLED         0x00000002L
  6494.  
  6495. #define MF_UNCHECKED        0x00000000L
  6496. #define MF_CHECKED          0x00000008L
  6497. #define MF_USECHECKBITMAPS  0x00000200L
  6498.  
  6499. #define MF_STRING           0x00000000L
  6500. #define MF_BITMAP           0x00000004L
  6501. #define MF_OWNERDRAW        0x00000100L
  6502.  
  6503. #define MF_POPUP            0x00000010L
  6504. #define MF_MENUBARBREAK     0x00000020L
  6505. #define MF_MENUBREAK        0x00000040L
  6506.  
  6507. #define MF_UNHILITE         0x00000000L
  6508. #define MF_HILITE           0x00000080L
  6509.  
  6510. #if(WINVER >= 0x0400)
  6511. #define MF_DEFAULT          0x00001000L
  6512. #endif /* WINVER >= 0x0400 */
  6513. #define MF_SYSMENU          0x00002000L
  6514. #define MF_HELP             0x00004000L
  6515. #if(WINVER >= 0x0400)
  6516. #define MF_RIGHTJUSTIFY     0x00004000L
  6517. #endif /* WINVER >= 0x0400 */
  6518.  
  6519. #define MF_MOUSESELECT      0x00008000L
  6520. #if(WINVER >= 0x0400)
  6521. #define MF_END              0x00000080L  /* Obsolete -- only used by old RES files */
  6522. #endif /* WINVER >= 0x0400 */
  6523.  
  6524.  
  6525. #if(WINVER >= 0x0400)
  6526. #define MFT_STRING          MF_STRING
  6527. #define MFT_BITMAP          MF_BITMAP
  6528. #define MFT_MENUBARBREAK    MF_MENUBARBREAK
  6529. #define MFT_MENUBREAK       MF_MENUBREAK
  6530. #define MFT_OWNERDRAW       MF_OWNERDRAW
  6531. #define MFT_RADIOCHECK      0x00000200L
  6532. #define MFT_SEPARATOR       MF_SEPARATOR
  6533. #define MFT_RIGHTORDER      0x00002000L
  6534. #define MFT_RIGHTJUSTIFY    MF_RIGHTJUSTIFY
  6535.  
  6536. /* Menu flags for Add/Check/EnableMenuItem() */
  6537. #define MFS_GRAYED          0x00000003L
  6538. #define MFS_DISABLED        MFS_GRAYED
  6539. #define MFS_CHECKED         MF_CHECKED
  6540. #define MFS_HILITE          MF_HILITE
  6541. #define MFS_ENABLED         MF_ENABLED
  6542. #define MFS_UNCHECKED       MF_UNCHECKED
  6543. #define MFS_UNHILITE        MF_UNHILITE
  6544. #define MFS_DEFAULT         MF_DEFAULT
  6545.  
  6546.  
  6547.  
  6548. #endif /* WINVER >= 0x0400 */
  6549.  
  6550. // end_r_winuser
  6551.  
  6552. #if(WINVER >= 0x0400)
  6553.  
  6554. WINUSERAPI
  6555. BOOL
  6556. WINAPI
  6557. CheckMenuRadioItem(HMENU, UINT, UINT, UINT, UINT);
  6558. #endif /* WINVER >= 0x0400 */
  6559.  
  6560.  
  6561.  
  6562. /*
  6563.  * Menu item resource format
  6564.  */
  6565. typedef struct {
  6566.     WORD versionNumber;
  6567.     WORD offset;
  6568. } MENUITEMTEMPLATEHEADER, *PMENUITEMTEMPLATEHEADER;
  6569.  
  6570. typedef struct {        // version 0
  6571.     WORD mtOption;
  6572.     WORD mtID;
  6573.     WCHAR mtString[1];
  6574. } MENUITEMTEMPLATE, *PMENUITEMTEMPLATE;
  6575. #define MF_END             0x00000080L          // r_winuser
  6576.  
  6577. #endif /* !NOMENUS */
  6578.  
  6579. #ifndef NOSYSCOMMANDS
  6580.  
  6581. // begin_r_winuser
  6582. /*
  6583.  * System Menu Command Values
  6584.  */
  6585. #define SC_SIZE         0xF000
  6586. #define SC_MOVE         0xF010
  6587. #define SC_MINIMIZE     0xF020
  6588. #define SC_MAXIMIZE     0xF030
  6589. #define SC_NEXTWINDOW   0xF040
  6590. #define SC_PREVWINDOW   0xF050
  6591. #define SC_CLOSE        0xF060
  6592. #define SC_VSCROLL      0xF070
  6593. #define SC_HSCROLL      0xF080
  6594. #define SC_MOUSEMENU    0xF090
  6595. #define SC_KEYMENU      0xF100
  6596. #define SC_ARRANGE      0xF110
  6597. #define SC_RESTORE      0xF120
  6598. #define SC_TASKLIST     0xF130
  6599. #define SC_SCREENSAVE   0xF140
  6600. #define SC_HOTKEY       0xF150
  6601. #if(WINVER >= 0x0400)
  6602. #define SC_DEFAULT      0xF160
  6603. #define SC_MONITORPOWER 0xF170
  6604. #define SC_CONTEXTHELP  0xF180
  6605. #define SC_SEPARATOR    0xF00F
  6606. #endif /* WINVER >= 0x0400 */
  6607. /*
  6608.  * Obsolete names
  6609.  */
  6610. #define SC_ICON         SC_MINIMIZE
  6611. #define SC_ZOOM         SC_MAXIMIZE
  6612.  
  6613. // end_r_winuser
  6614. #endif /* !NOSYSCOMMANDS */
  6615.  
  6616. /*
  6617.  * Resource Loading Routines
  6618.  */
  6619.  
  6620. WINUSERAPI
  6621. HBITMAP
  6622. WINAPI
  6623. LoadBitmapA(
  6624.     HINSTANCE hInstance,
  6625.     LPCSTR lpBitmapName);
  6626. WINUSERAPI
  6627. HBITMAP
  6628. WINAPI
  6629. LoadBitmapW(
  6630.     HINSTANCE hInstance,
  6631.     LPCWSTR lpBitmapName);
  6632. #ifdef UNICODE
  6633. #define LoadBitmap  LoadBitmapW
  6634. #else
  6635. #define LoadBitmap  LoadBitmapA
  6636. #endif // !UNICODE
  6637.  
  6638. WINUSERAPI
  6639. HCURSOR
  6640. WINAPI
  6641. LoadCursorA(
  6642.     HINSTANCE hInstance,
  6643.     LPCSTR lpCursorName);
  6644. WINUSERAPI
  6645. HCURSOR
  6646. WINAPI
  6647. LoadCursorW(
  6648.     HINSTANCE hInstance,
  6649.     LPCWSTR lpCursorName);
  6650. #ifdef UNICODE
  6651. #define LoadCursor  LoadCursorW
  6652. #else
  6653. #define LoadCursor  LoadCursorA
  6654. #endif // !UNICODE
  6655.  
  6656. WINUSERAPI
  6657. HCURSOR
  6658. WINAPI
  6659. LoadCursorFromFileA(
  6660.     LPCSTR    lpFileName);
  6661. WINUSERAPI
  6662. HCURSOR
  6663. WINAPI
  6664. LoadCursorFromFileW(
  6665.     LPCWSTR    lpFileName);
  6666. #ifdef UNICODE
  6667. #define LoadCursorFromFile  LoadCursorFromFileW
  6668. #else
  6669. #define LoadCursorFromFile  LoadCursorFromFileA
  6670. #endif // !UNICODE
  6671.  
  6672. WINUSERAPI
  6673. HCURSOR
  6674. WINAPI
  6675. CreateCursor(
  6676.     HINSTANCE hInst,
  6677.     int xHotSpot,
  6678.     int yHotSpot,
  6679.     int nWidth,
  6680.     int nHeight,
  6681.     CONST VOID *pvANDPlane,
  6682.     CONST VOID *pvXORPlane);
  6683.  
  6684. WINUSERAPI
  6685. BOOL
  6686. WINAPI
  6687. DestroyCursor(
  6688.     HCURSOR hCursor);
  6689.  
  6690. #define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur)))
  6691.  
  6692. /*
  6693.  * Standard Cursor IDs
  6694.  */
  6695. #define IDC_ARROW           MAKEINTRESOURCE(32512)
  6696. #define IDC_IBEAM           MAKEINTRESOURCE(32513)
  6697. #define IDC_WAIT            MAKEINTRESOURCE(32514)
  6698. #define IDC_CROSS           MAKEINTRESOURCE(32515)
  6699. #define IDC_UPARROW         MAKEINTRESOURCE(32516)
  6700. #define IDC_SIZE            MAKEINTRESOURCE(32640)  /* OBSOLETE: use IDC_SIZEALL */
  6701. #define IDC_ICON            MAKEINTRESOURCE(32641)  /* OBSOLETE: use IDC_ARROW */
  6702. #define IDC_SIZENWSE        MAKEINTRESOURCE(32642)
  6703. #define IDC_SIZENESW        MAKEINTRESOURCE(32643)
  6704. #define IDC_SIZEWE          MAKEINTRESOURCE(32644)
  6705. #define IDC_SIZENS          MAKEINTRESOURCE(32645)
  6706. #define IDC_SIZEALL         MAKEINTRESOURCE(32646)
  6707. #define IDC_NO              MAKEINTRESOURCE(32648) /*not in win3.1 */
  6708. #define IDC_APPSTARTING     MAKEINTRESOURCE(32650) /*not in win3.1 */
  6709. #if(WINVER >= 0x0400)
  6710. #define IDC_HELP            MAKEINTRESOURCE(32651)
  6711. #endif /* WINVER >= 0x0400 */
  6712.  
  6713. WINUSERAPI
  6714. BOOL
  6715. WINAPI
  6716. SetSystemCursor(
  6717.     HCURSOR hcur,
  6718.     DWORD   id);
  6719.  
  6720. typedef struct _ICONINFO {
  6721.     BOOL    fIcon;
  6722.     DWORD   xHotspot;
  6723.     DWORD   yHotspot;
  6724.     HBITMAP hbmMask;
  6725.     HBITMAP hbmColor;
  6726. } ICONINFO;
  6727. typedef ICONINFO *PICONINFO;
  6728.  
  6729. WINUSERAPI
  6730. HICON
  6731. WINAPI
  6732. LoadIconA(
  6733.     HINSTANCE hInstance,
  6734.     LPCSTR lpIconName);
  6735. WINUSERAPI
  6736. HICON
  6737. WINAPI
  6738. LoadIconW(
  6739.     HINSTANCE hInstance,
  6740.     LPCWSTR lpIconName);
  6741. #ifdef UNICODE
  6742. #define LoadIcon  LoadIconW
  6743. #else
  6744. #define LoadIcon  LoadIconA
  6745. #endif // !UNICODE
  6746.  
  6747.  
  6748. WINUSERAPI
  6749. HICON
  6750. WINAPI
  6751. CreateIcon(
  6752.     HINSTANCE hInstance,
  6753.     int nWidth,
  6754.     int nHeight,
  6755.     BYTE cPlanes,
  6756.     BYTE cBitsPixel,
  6757.     CONST BYTE *lpbANDbits,
  6758.     CONST BYTE *lpbXORbits);
  6759.  
  6760. WINUSERAPI
  6761. BOOL
  6762. WINAPI
  6763. DestroyIcon(
  6764.     HICON hIcon);
  6765.  
  6766. WINUSERAPI
  6767. int
  6768. WINAPI
  6769. LookupIconIdFromDirectory(
  6770.     PBYTE presbits,
  6771.     BOOL fIcon);
  6772.  
  6773. #if(WINVER >= 0x0400)
  6774. WINUSERAPI
  6775. int
  6776. WINAPI
  6777. LookupIconIdFromDirectoryEx(
  6778.     PBYTE presbits,
  6779.     BOOL  fIcon,
  6780.     int   cxDesired,
  6781.     int   cyDesired,
  6782.     UINT  Flags);
  6783. #endif /* WINVER >= 0x0400 */
  6784.  
  6785. WINUSERAPI
  6786. HICON
  6787. WINAPI
  6788. CreateIconFromResource(
  6789.     PBYTE presbits,
  6790.     DWORD dwResSize,
  6791.     BOOL fIcon,
  6792.     DWORD dwVer);
  6793.  
  6794. #if(WINVER >= 0x0400)
  6795. WINUSERAPI
  6796. HICON
  6797. WINAPI
  6798. CreateIconFromResourceEx(
  6799.     PBYTE presbits,
  6800.     DWORD dwResSize,
  6801.     BOOL  fIcon,
  6802.     DWORD dwVer,
  6803.     int   cxDesired,
  6804.     int   cyDesired,
  6805.     UINT  Flags);
  6806.  
  6807. /* Icon/Cursor header */
  6808. typedef struct tagCURSORSHAPE
  6809. {
  6810.     int     xHotSpot;
  6811.     int     yHotSpot;
  6812.     int     cx;
  6813.     int     cy;
  6814.     int     cbWidth;
  6815.     BYTE    Planes;
  6816.     BYTE    BitsPixel;
  6817. } CURSORSHAPE, FAR *LPCURSORSHAPE;
  6818. #endif /* WINVER >= 0x0400 */
  6819.  
  6820. #define IMAGE_BITMAP        0
  6821. #define IMAGE_ICON          1
  6822. #define IMAGE_CURSOR        2
  6823. #if(WINVER >= 0x0400)
  6824. #define IMAGE_ENHMETAFILE   3
  6825.  
  6826. #define LR_DEFAULTCOLOR     0x0000
  6827. #define LR_MONOCHROME       0x0001
  6828. #define LR_COLOR            0x0002
  6829. #define LR_COPYRETURNORG    0x0004
  6830. #define LR_COPYDELETEORG    0x0008
  6831. #define LR_LOADFROMFILE     0x0010
  6832. #define LR_LOADTRANSPARENT  0x0020
  6833. #define LR_DEFAULTSIZE      0x0040
  6834. #define LR_VGACOLOR         0x0080
  6835. #define LR_LOADMAP3DCOLORS  0x1000
  6836. #define LR_CREATEDIBSECTION 0x2000
  6837. #define LR_COPYFROMRESOURCE 0x4000
  6838. #define LR_SHARED           0x8000
  6839.  
  6840. WINUSERAPI
  6841. HANDLE
  6842. WINAPI
  6843. LoadImageA(
  6844.     HINSTANCE,
  6845.     LPCSTR,
  6846.     UINT,
  6847.     int,
  6848.     int,
  6849.     UINT);
  6850. WINUSERAPI
  6851. HANDLE
  6852. WINAPI
  6853. LoadImageW(
  6854.     HINSTANCE,
  6855.     LPCWSTR,
  6856.     UINT,
  6857.     int,
  6858.     int,
  6859.     UINT);
  6860. #ifdef UNICODE
  6861. #define LoadImage  LoadImageW
  6862. #else
  6863. #define LoadImage  LoadImageA
  6864. #endif // !UNICODE
  6865.  
  6866. WINUSERAPI
  6867. HANDLE
  6868. WINAPI
  6869. CopyImage(
  6870.     HANDLE,
  6871.     UINT,
  6872.     int,
  6873.     int,
  6874.     UINT);
  6875.  
  6876. #define DI_MASK         0x0001
  6877. #define DI_IMAGE        0x0002
  6878. #define DI_NORMAL       0x0003
  6879. #define DI_COMPAT       0x0004
  6880. #define DI_DEFAULTSIZE  0x0008
  6881.  
  6882.  
  6883. WINUSERAPI BOOL WINAPI DrawIconEx(HDC hdc, int xLeft, int yTop,
  6884.               HICON hIcon, int cxWidth, int cyWidth,
  6885.               UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags);
  6886. #endif /* WINVER >= 0x0400 */
  6887.  
  6888. WINUSERAPI
  6889. HICON
  6890. WINAPI
  6891. CreateIconIndirect(
  6892.     PICONINFO piconinfo);
  6893.  
  6894. WINUSERAPI
  6895. HICON
  6896. WINAPI
  6897. CopyIcon(
  6898.     HICON hIcon);
  6899.  
  6900. WINUSERAPI
  6901. BOOL
  6902. WINAPI
  6903. GetIconInfo(
  6904.     HICON hIcon,
  6905.     PICONINFO piconinfo);
  6906.  
  6907. #if(WINVER >= 0x0400)
  6908. #define RES_ICON    1
  6909. #define RES_CURSOR  2
  6910. #endif /* WINVER >= 0x0400 */
  6911.  
  6912. #ifdef OEMRESOURCE
  6913.  
  6914. // begin_r_winuser
  6915.  
  6916. /*
  6917.  * OEM Resource Ordinal Numbers
  6918.  */
  6919. #define OBM_CLOSE           32754
  6920. #define OBM_UPARROW         32753
  6921. #define OBM_DNARROW         32752
  6922. #define OBM_RGARROW         32751
  6923. #define OBM_LFARROW         32750
  6924. #define OBM_REDUCE          32749
  6925. #define OBM_ZOOM            32748
  6926. #define OBM_RESTORE         32747
  6927. #define OBM_REDUCED         32746
  6928. #define OBM_ZOOMD           32745
  6929. #define OBM_RESTORED        32744
  6930. #define OBM_UPARROWD        32743
  6931. #define OBM_DNARROWD        32742
  6932. #define OBM_RGARROWD        32741
  6933. #define OBM_LFARROWD        32740
  6934. #define OBM_MNARROW         32739
  6935. #define OBM_COMBO           32738
  6936. #define OBM_UPARROWI        32737
  6937. #define OBM_DNARROWI        32736
  6938. #define OBM_RGARROWI        32735
  6939. #define OBM_LFARROWI        32734
  6940.  
  6941. #define OBM_OLD_CLOSE       32767
  6942. #define OBM_SIZE            32766
  6943. #define OBM_OLD_UPARROW     32765
  6944. #define OBM_OLD_DNARROW     32764
  6945. #define OBM_OLD_RGARROW     32763
  6946. #define OBM_OLD_LFARROW     32762
  6947. #define OBM_BTSIZE          32761
  6948. #define OBM_CHECK           32760
  6949. #define OBM_CHECKBOXES      32759
  6950. #define OBM_BTNCORNERS      32758
  6951. #define OBM_OLD_REDUCE      32757
  6952. #define OBM_OLD_ZOOM        32756
  6953. #define OBM_OLD_RESTORE     32755
  6954.  
  6955. #define OCR_NORMAL          32512
  6956. #define OCR_IBEAM           32513
  6957. #define OCR_WAIT            32514
  6958. #define OCR_CROSS           32515
  6959. #define OCR_UP              32516
  6960. #define OCR_SIZE            32640   /* OBSOLETE: use OCR_SIZEALL */
  6961. #define OCR_ICON            32641   /* OBSOLETE: use OCR_NORMAL */
  6962. #define OCR_SIZENWSE        32642
  6963. #define OCR_SIZENESW        32643
  6964. #define OCR_SIZEWE          32644
  6965. #define OCR_SIZENS          32645
  6966. #define OCR_SIZEALL         32646
  6967. #define OCR_ICOCUR          32647   /* OBSOLETE: use OIC_WINLOGO */
  6968. #define OCR_NO              32648
  6969. #if(WINVER >= 0x0400)
  6970. #define OCR_APPSTARTING     32650
  6971. #endif /* WINVER >= 0x0400 */
  6972.  
  6973.  
  6974.  
  6975. #define OIC_SAMPLE          32512
  6976. #define OIC_HAND            32513
  6977. #define OIC_QUES            32514
  6978. #define OIC_BANG            32515
  6979. #define OIC_NOTE            32516
  6980. #if(WINVER >= 0x0400)
  6981. #define OIC_WINLOGO         32517
  6982. #define OIC_WARNING         OIC_BANG
  6983. #define OIC_ERROR           OIC_HAND
  6984. #define OIC_INFORMATION     OIC_NOTE
  6985. #endif /* WINVER >= 0x0400 */
  6986.  
  6987.  
  6988. // end_r_winuser
  6989.  
  6990. #endif /* OEMRESOURCE */
  6991.  
  6992. #define ORD_LANGDRIVER    1     /* The ordinal number for the entry point of
  6993.                                 ** language drivers.
  6994.                                 */
  6995.  
  6996. #ifndef NOICONS
  6997.  
  6998. // begin_r_winuser
  6999. /*
  7000.  * Standard Icon IDs
  7001.  */
  7002. #ifdef RC_INVOKED
  7003. #define IDI_APPLICATION     32512
  7004. #define IDI_HAND            32513
  7005. #define IDI_QUESTION        32514
  7006. #define IDI_EXCLAMATION     32515
  7007. #define IDI_ASTERISK        32516
  7008. #if(WINVER >= 0x0400)
  7009. #define IDI_WINLOGO         32517
  7010. #endif /* WINVER >= 0x0400 */
  7011. #else
  7012. #define IDI_APPLICATION     MAKEINTRESOURCE(32512)
  7013. #define IDI_HAND            MAKEINTRESOURCE(32513)
  7014. #define IDI_QUESTION        MAKEINTRESOURCE(32514)
  7015. #define IDI_EXCLAMATION     MAKEINTRESOURCE(32515)
  7016. #define IDI_ASTERISK        MAKEINTRESOURCE(32516)
  7017. #if(WINVER >= 0x0400)
  7018. #define IDI_WINLOGO         MAKEINTRESOURCE(32517)
  7019. #endif /* WINVER >= 0x0400 */
  7020. #endif /* RC_INVOKED */
  7021.  
  7022. #if(WINVER >= 0x0400)
  7023. #define IDI_WARNING     IDI_EXCLAMATION
  7024. #define IDI_ERROR       IDI_HAND
  7025. #define IDI_INFORMATION IDI_ASTERISK
  7026. #endif /* WINVER >= 0x0400 */
  7027.  
  7028. // end_r_winuser
  7029.  
  7030. #endif /* !NOICONS */
  7031.  
  7032. WINUSERAPI
  7033. int
  7034. WINAPI
  7035. LoadStringA(
  7036.     HINSTANCE hInstance,
  7037.     UINT uID,
  7038.     LPSTR lpBuffer,
  7039.     int nBufferMax);
  7040. WINUSERAPI
  7041. int
  7042. WINAPI
  7043. LoadStringW(
  7044.     HINSTANCE hInstance,
  7045.     UINT uID,
  7046.     LPWSTR lpBuffer,
  7047.     int nBufferMax);
  7048. #ifdef UNICODE
  7049. #define LoadString  LoadStringW
  7050. #else
  7051. #define LoadString  LoadStringA
  7052. #endif // !UNICODE
  7053.  
  7054. // begin_r_winuser
  7055.  
  7056. /*
  7057.  * Dialog Box Command IDs
  7058.  */
  7059. #define IDOK                1
  7060. #define IDCANCEL            2
  7061. #define IDABORT             3
  7062. #define IDRETRY             4
  7063. #define IDIGNORE            5
  7064. #define IDYES               6
  7065. #define IDNO                7
  7066. #if(WINVER >= 0x0400)
  7067. #define IDCLOSE         8
  7068. #define IDHELP          9
  7069. #endif /* WINVER >= 0x0400 */
  7070.  
  7071. // end_r_winuser
  7072.  
  7073. #ifndef NOCTLMGR
  7074.  
  7075. /*
  7076.  * Control Manager Structures and Definitions
  7077.  */
  7078.  
  7079. #ifndef NOWINSTYLES
  7080.  
  7081. // begin_r_winuser
  7082.  
  7083. /*
  7084.  * Edit Control Styles
  7085.  */
  7086. #define ES_LEFT             0x0000L
  7087. #define ES_CENTER           0x0001L
  7088. #define ES_RIGHT            0x0002L
  7089. #define ES_MULTILINE        0x0004L
  7090. #define ES_UPPERCASE        0x0008L
  7091. #define ES_LOWERCASE        0x0010L
  7092. #define ES_PASSWORD         0x0020L
  7093. #define ES_AUTOVSCROLL      0x0040L
  7094. #define ES_AUTOHSCROLL      0x0080L
  7095. #define ES_NOHIDESEL        0x0100L
  7096. #define ES_OEMCONVERT       0x0400L
  7097. #define ES_READONLY         0x0800L
  7098. #define ES_WANTRETURN       0x1000L
  7099. #if(WINVER >= 0x0400)
  7100. #define ES_NUMBER           0x2000L
  7101. #endif /* WINVER >= 0x0400 */
  7102.  
  7103. // end_r_winuser
  7104.  
  7105. #endif /* !NOWINSTYLES */
  7106.  
  7107. /*
  7108.  * Edit Control Notification Codes
  7109.  */
  7110. #define EN_SETFOCUS         0x0100
  7111. #define EN_KILLFOCUS        0x0200
  7112. #define EN_CHANGE           0x0300
  7113. #define EN_UPDATE           0x0400
  7114. #define EN_ERRSPACE         0x0500
  7115. #define EN_MAXTEXT          0x0501
  7116. #define EN_HSCROLL          0x0601
  7117. #define EN_VSCROLL          0x0602
  7118.  
  7119. #if(WINVER >= 0x0400)
  7120. /* Edit control EM_SETMARGIN parameters */
  7121. #define EC_LEFTMARGIN       0x0001
  7122. #define EC_RIGHTMARGIN      0x0002
  7123. #define EC_USEFONTINFO      0xffff
  7124. #endif /* WINVER >= 0x0400 */
  7125.  
  7126. #ifndef NOWINMESSAGES
  7127.  
  7128. // begin_r_winuser
  7129.  
  7130. /*
  7131.  * Edit Control Messages
  7132.  */
  7133. #define EM_GETSEL               0x00B0
  7134. #define EM_SETSEL               0x00B1
  7135. #define EM_GETRECT              0x00B2
  7136. #define EM_SETRECT              0x00B3
  7137. #define EM_SETRECTNP            0x00B4
  7138. #define EM_SCROLL               0x00B5
  7139. #define EM_LINESCROLL           0x00B6
  7140. #define EM_SCROLLCARET          0x00B7
  7141. #define EM_GETMODIFY            0x00B8
  7142. #define EM_SETMODIFY            0x00B9
  7143. #define EM_GETLINECOUNT         0x00BA
  7144. #define EM_LINEINDEX            0x00BB
  7145. #define EM_SETHANDLE            0x00BC
  7146. #define EM_GETHANDLE            0x00BD
  7147. #define EM_GETTHUMB             0x00BE
  7148. #define EM_LINELENGTH           0x00C1
  7149. #define EM_REPLACESEL           0x00C2
  7150. #define EM_GETLINE              0x00C4
  7151. #define EM_LIMITTEXT            0x00C5
  7152. #define EM_CANUNDO              0x00C6
  7153. #define EM_UNDO                 0x00C7
  7154. #define EM_FMTLINES             0x00C8
  7155. #define EM_LINEFROMCHAR         0x00C9
  7156. #define EM_SETTABSTOPS          0x00CB
  7157. #define EM_SETPASSWORDCHAR      0x00CC
  7158. #define EM_EMPTYUNDOBUFFER      0x00CD
  7159. #define EM_GETFIRSTVISIBLELINE  0x00CE
  7160. #define EM_SETREADONLY          0x00CF
  7161. #define EM_SETWORDBREAKPROC     0x00D0
  7162. #define EM_GETWORDBREAKPROC     0x00D1
  7163. #define EM_GETPASSWORDCHAR      0x00D2
  7164. #if(WINVER >= 0x0400)
  7165. #define EM_SETMARGINS           0x00D3
  7166. #define EM_GETMARGINS           0x00D4
  7167. #define EM_SETLIMITTEXT         EM_LIMITTEXT   /* ;win40 Name change */
  7168. #define EM_GETLIMITTEXT         0x00D5
  7169. #define EM_POSFROMCHAR          0x00D6
  7170. #define EM_CHARFROMPOS          0x00D7
  7171. #endif /* WINVER >= 0x0400 */
  7172.  
  7173.  
  7174. // end_r_winuser
  7175. #endif /* !NOWINMESSAGES */
  7176.  
  7177. /*
  7178.  * EDITWORDBREAKPROC code values
  7179.  */
  7180. #define WB_LEFT            0
  7181. #define WB_RIGHT           1
  7182. #define WB_ISDELIMITER     2
  7183.  
  7184. // begin_r_winuser
  7185.  
  7186. /*
  7187.  * Button Control Styles
  7188.  */
  7189. #define BS_PUSHBUTTON       0x00000000L
  7190. #define BS_DEFPUSHBUTTON    0x00000001L
  7191. #define BS_CHECKBOX         0x00000002L
  7192. #define BS_AUTOCHECKBOX     0x00000003L
  7193. #define BS_RADIOBUTTON      0x00000004L
  7194. #define BS_3STATE           0x00000005L
  7195. #define BS_AUTO3STATE       0x00000006L
  7196. #define BS_GROUPBOX         0x00000007L
  7197. #define BS_USERBUTTON       0x00000008L
  7198. #define BS_AUTORADIOBUTTON  0x00000009L
  7199. #define BS_OWNERDRAW        0x0000000BL
  7200. #define BS_LEFTTEXT         0x00000020L
  7201. #if(WINVER >= 0x0400)
  7202. #define BS_TEXT             0x00000000L
  7203. #define BS_ICON             0x00000040L
  7204. #define BS_BITMAP           0x00000080L
  7205. #define BS_LEFT             0x00000100L
  7206. #define BS_RIGHT            0x00000200L
  7207. #define BS_CENTER           0x00000300L
  7208. #define BS_TOP              0x00000400L
  7209. #define BS_BOTTOM           0x00000800L
  7210. #define BS_VCENTER          0x00000C00L
  7211. #define BS_PUSHLIKE         0x00001000L
  7212. #define BS_MULTILINE        0x00002000L
  7213. #define BS_NOTIFY           0x00004000L
  7214. #define BS_FLAT             0x00008000L
  7215. #define BS_RIGHTBUTTON      BS_LEFTTEXT
  7216. #endif /* WINVER >= 0x0400 */
  7217.  
  7218.  
  7219. /*
  7220.  * User Button Notification Codes
  7221.  */
  7222. #define BN_CLICKED          0
  7223. #define BN_PAINT            1
  7224. #define BN_HILITE           2
  7225. #define BN_UNHILITE         3
  7226. #define BN_DISABLE          4
  7227. #define BN_DOUBLECLICKED    5
  7228. #if(WINVER >= 0x0400)
  7229. #define BN_PUSHED           BN_HILITE
  7230. #define BN_UNPUSHED         BN_UNHILITE
  7231. #define BN_DBLCLK           BN_DOUBLECLICKED
  7232. #define BN_SETFOCUS         6
  7233. #define BN_KILLFOCUS        7
  7234. #endif /* WINVER >= 0x0400 */
  7235.  
  7236. /*
  7237.  * Button Control Messages
  7238.  */
  7239. #define BM_GETCHECK        0x00F0
  7240. #define BM_SETCHECK        0x00F1
  7241. #define BM_GETSTATE        0x00F2
  7242. #define BM_SETSTATE        0x00F3
  7243. #define BM_SETSTYLE        0x00F4
  7244. #if(WINVER >= 0x0400)
  7245. #define BM_CLICK           0x00F5
  7246. #define BM_GETIMAGE        0x00F6
  7247. #define BM_SETIMAGE        0x00F7
  7248.  
  7249. #define BST_UNCHECKED      0x0000
  7250. #define BST_CHECKED        0x0001
  7251. #define BST_INDETERMINATE  0x0002
  7252. #define BST_PUSHED         0x0004
  7253. #define BST_FOCUS          0x0008
  7254. #endif /* WINVER >= 0x0400 */
  7255.  
  7256. /*
  7257.  * Static Control Constants
  7258.  */
  7259. #define SS_LEFT             0x00000000L
  7260. #define SS_CENTER           0x00000001L
  7261. #define SS_RIGHT            0x00000002L
  7262. #define SS_ICON             0x00000003L
  7263. #define SS_BLACKRECT        0x00000004L
  7264. #define SS_GRAYRECT         0x00000005L
  7265. #define SS_WHITERECT        0x00000006L
  7266. #define SS_BLACKFRAME       0x00000007L
  7267. #define SS_GRAYFRAME        0x00000008L
  7268. #define SS_WHITEFRAME       0x00000009L
  7269. #define SS_USERITEM         0x0000000AL
  7270. #define SS_SIMPLE           0x0000000BL
  7271. #define SS_LEFTNOWORDWRAP   0x0000000CL
  7272. #if(WINVER >= 0x0400)
  7273. #define SS_OWNERDRAW        0x0000000DL
  7274. #define SS_BITMAP           0x0000000EL
  7275. #define SS_ENHMETAFILE      0x0000000FL
  7276. #define SS_ETCHEDHORZ       0x00000010L
  7277. #define SS_ETCHEDVERT       0x00000011L
  7278. #define SS_ETCHEDFRAME      0x00000012L
  7279. #define SS_TYPEMASK         0x0000001FL
  7280. #endif /* WINVER >= 0x0400 */
  7281. #define SS_NOPREFIX         0x00000080L /* Don't do "&" character translation */
  7282. #if(WINVER >= 0x0400)
  7283. #define SS_NOTIFY           0x00000100L
  7284. #define SS_CENTERIMAGE      0x00000200L
  7285. #define SS_RIGHTJUST        0x00000400L
  7286. #define SS_REALSIZEIMAGE    0x00000800L
  7287. #define SS_SUNKEN           0x00001000L
  7288. #define SS_ENDELLIPSIS      0x00004000L
  7289. #define SS_PATHELLIPSIS     0x00008000L
  7290. #define SS_WORDELLIPSIS     0x0000C000L
  7291. #define SS_ELLIPSISMASK     0x0000C000L
  7292. #endif /* WINVER >= 0x0400 */
  7293.  
  7294. // end_r_winuser
  7295.  
  7296. #ifndef NOWINMESSAGES
  7297. /*
  7298.  * Static Control Mesages
  7299.  */
  7300. #define STM_SETICON         0x0170
  7301. #define STM_GETICON         0x0171
  7302. #if(WINVER >= 0x0400)
  7303. #define STM_SETIMAGE        0x0172
  7304. #define STM_GETIMAGE        0x0173
  7305. #define STN_CLICKED         0
  7306. #define STN_DBLCLK          1
  7307. #define STN_ENABLE          2
  7308. #define STN_DISABLE         3
  7309. #endif /* WINVER >= 0x0400 */
  7310. #define STM_MSGMAX          0x0174
  7311. #endif /* !NOWINMESSAGES */
  7312.  
  7313. /*
  7314.  * Dialog window class
  7315.  */
  7316. #define WC_DIALOG       (MAKEINTATOM(0x8002))
  7317.  
  7318. /*
  7319.  * Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  7320.  */
  7321. #define DWL_MSGRESULT   0
  7322. #define DWL_DLGPROC     4
  7323. #define DWL_USER        8
  7324.  
  7325. /*
  7326.  * Dialog Manager Routines
  7327.  */
  7328.  
  7329. #ifndef NOMSG
  7330.  
  7331. WINUSERAPI
  7332. BOOL
  7333. WINAPI
  7334. IsDialogMessageA(
  7335.     HWND hDlg,
  7336.     LPMSG lpMsg);
  7337. WINUSERAPI
  7338. BOOL
  7339. WINAPI
  7340. IsDialogMessageW(
  7341.     HWND hDlg,
  7342.     LPMSG lpMsg);
  7343. #ifdef UNICODE
  7344. #define IsDialogMessage  IsDialogMessageW
  7345. #else
  7346. #define IsDialogMessage  IsDialogMessageA
  7347. #endif // !UNICODE
  7348.  
  7349. #endif /* !NOMSG */
  7350.  
  7351. WINUSERAPI
  7352. BOOL
  7353. WINAPI
  7354. MapDialogRect(
  7355.     HWND hDlg,
  7356.     LPRECT lpRect);
  7357.  
  7358. WINUSERAPI
  7359. int
  7360. WINAPI
  7361. DlgDirListA(
  7362.     HWND hDlg,
  7363.     LPSTR lpPathSpec,
  7364.     int nIDListBox,
  7365.     int nIDStaticPath,
  7366.     UINT uFileType);
  7367. WINUSERAPI
  7368. int
  7369. WINAPI
  7370. DlgDirListW(
  7371.     HWND hDlg,
  7372.     LPWSTR lpPathSpec,
  7373.     int nIDListBox,
  7374.     int nIDStaticPath,
  7375.     UINT uFileType);
  7376. #ifdef UNICODE
  7377. #define DlgDirList  DlgDirListW
  7378. #else
  7379. #define DlgDirList  DlgDirListA
  7380. #endif // !UNICODE
  7381.  
  7382. /*
  7383.  * DlgDirList, DlgDirListComboBox flags values
  7384.  */
  7385. #define DDL_READWRITE       0x0000
  7386. #define DDL_READONLY        0x0001
  7387. #define DDL_HIDDEN          0x0002
  7388. #define DDL_SYSTEM          0x0004
  7389. #define DDL_DIRECTORY       0x0010
  7390. #define DDL_ARCHIVE         0x0020
  7391.  
  7392. #define DDL_POSTMSGS        0x2000
  7393. #define DDL_DRIVES          0x4000
  7394. #define DDL_EXCLUSIVE       0x8000
  7395.  
  7396. WINUSERAPI
  7397. BOOL
  7398. WINAPI
  7399. DlgDirSelectExA(
  7400.     HWND hDlg,
  7401.     LPSTR lpString,
  7402.     int nCount,
  7403.     int nIDListBox);
  7404. WINUSERAPI
  7405. BOOL
  7406. WINAPI
  7407. DlgDirSelectExW(
  7408.     HWND hDlg,
  7409.     LPWSTR lpString,
  7410.     int nCount,
  7411.     int nIDListBox);
  7412. #ifdef UNICODE
  7413. #define DlgDirSelectEx  DlgDirSelectExW
  7414. #else
  7415. #define DlgDirSelectEx  DlgDirSelectExA
  7416. #endif // !UNICODE
  7417.  
  7418. WINUSERAPI
  7419. int
  7420. WINAPI
  7421. DlgDirListComboBoxA(
  7422.     HWND hDlg,
  7423.     LPSTR lpPathSpec,
  7424.     int nIDComboBox,
  7425.     int nIDStaticPath,
  7426.     UINT uFiletype);
  7427. WINUSERAPI
  7428. int
  7429. WINAPI
  7430. DlgDirListComboBoxW(
  7431.     HWND hDlg,
  7432.     LPWSTR lpPathSpec,
  7433.     int nIDComboBox,
  7434.     int nIDStaticPath,
  7435.     UINT uFiletype);
  7436. #ifdef UNICODE
  7437. #define DlgDirListComboBox  DlgDirListComboBoxW
  7438. #else
  7439. #define DlgDirListComboBox  DlgDirListComboBoxA
  7440. #endif // !UNICODE
  7441.  
  7442. WINUSERAPI
  7443. BOOL
  7444. WINAPI
  7445. DlgDirSelectComboBoxExA(
  7446.     HWND hDlg,
  7447.     LPSTR lpString,
  7448.     int nCount,
  7449.     int nIDComboBox);
  7450. WINUSERAPI
  7451. BOOL
  7452. WINAPI
  7453. DlgDirSelectComboBoxExW(
  7454.     HWND hDlg,
  7455.     LPWSTR lpString,
  7456.     int nCount,
  7457.     int nIDComboBox);
  7458. #ifdef UNICODE
  7459. #define DlgDirSelectComboBoxEx  DlgDirSelectComboBoxExW
  7460. #else
  7461. #define DlgDirSelectComboBoxEx  DlgDirSelectComboBoxExA
  7462. #endif // !UNICODE
  7463.  
  7464.  
  7465. // begin_r_winuser
  7466.  
  7467. /*
  7468.  * Dialog Styles
  7469.  */
  7470. #define DS_ABSALIGN         0x01L
  7471. #define DS_SYSMODAL         0x02L
  7472. #define DS_LOCALEDIT        0x20L   /* Edit items get Local storage. */
  7473. #define DS_SETFONT          0x40L   /* User specified font for Dlg controls */
  7474. #define DS_MODALFRAME       0x80L   /* Can be combined with WS_CAPTION  */
  7475. #define DS_NOIDLEMSG        0x100L  /* WM_ENTERIDLE message will not be sent */
  7476. #define DS_SETFOREGROUND    0x200L  /* not in win3.1 */
  7477.  
  7478.  
  7479.  
  7480. #if(WINVER >= 0x0400)
  7481. #define DS_3DLOOK           0x0004L
  7482. #define DS_FIXEDSYS         0x0008L
  7483. #define DS_NOFAILCREATE     0x0010L
  7484. #define DS_CONTROL          0x0400L
  7485. #define DS_CENTER           0x0800L
  7486. #define DS_CENTERMOUSE      0x1000L
  7487. #define DS_CONTEXTHELP      0x2000L
  7488.  
  7489.  
  7490. #endif /* WINVER >= 0x0400 */
  7491.  
  7492. // end_r_winuser
  7493.  
  7494. #define DM_GETDEFID         (WM_USER+0)
  7495. #define DM_SETDEFID         (WM_USER+1)
  7496.  
  7497. #if(WINVER >= 0x0400)
  7498. #define DM_REPOSITION       (WM_USER+2)
  7499.  
  7500. #define PSM_PAGEINFO        (WM_USER+100)
  7501. #define PSM_SHEETINFO       (WM_USER+101)
  7502.  
  7503. #define PSI_SETACTIVE       0x0001L
  7504. #define PSI_KILLACTIVE      0x0002L
  7505. #define PSI_APPLY           0x0003L
  7506. #define PSI_RESET           0x0004L
  7507. #define PSI_HASHELP         0x0005L
  7508. #define PSI_HELP            0x0006L
  7509.  
  7510. #define PSI_CHANGED         0x0001L
  7511. #define PSI_GUISTART        0x0002L
  7512. #define PSI_REBOOT          0x0003L
  7513. #define PSI_GETSIBLINGS     0x0004L
  7514. #endif /* WINVER >= 0x0400 */
  7515. /*
  7516.  * Returned in HIWORD() of DM_GETDEFID result if msg is supported
  7517.  */
  7518. #define DC_HASDEFID         0x534B
  7519.  
  7520. /*
  7521.  * Dialog Codes
  7522.  */
  7523. #define DLGC_WANTARROWS     0x0001      /* Control wants arrow keys         */
  7524. #define DLGC_WANTTAB        0x0002      /* Control wants tab keys           */
  7525. #define DLGC_WANTALLKEYS    0x0004      /* Control wants all keys           */
  7526. #define DLGC_WANTMESSAGE    0x0004      /* Pass message to control          */
  7527. #define DLGC_HASSETSEL      0x0008      /* Understands EM_SETSEL message    */
  7528. #define DLGC_DEFPUSHBUTTON  0x0010      /* Default pushbutton               */
  7529. #define DLGC_UNDEFPUSHBUTTON 0x0020     /* Non-default pushbutton           */
  7530. #define DLGC_RADIOBUTTON    0x0040      /* Radio button                     */
  7531. #define DLGC_WANTCHARS      0x0080      /* Want WM_CHAR messages            */
  7532. #define DLGC_STATIC         0x0100      /* Static item: don't include       */
  7533. #define DLGC_BUTTON         0x2000      /* Button item: can be checked      */
  7534.  
  7535. #define LB_CTLCODE          0L
  7536.  
  7537. /*
  7538.  * Listbox Return Values
  7539.  */
  7540. #define LB_OKAY             0
  7541. #define LB_ERR              (-1)
  7542. #define LB_ERRSPACE         (-2)
  7543.  
  7544. /*
  7545. **  The idStaticPath parameter to DlgDirList can have the following values
  7546. **  ORed if the list box should show other details of the files along with
  7547. **  the name of the files;
  7548. */
  7549.                                   /* all other details also will be returned */
  7550.  
  7551.  
  7552. /*
  7553.  * Listbox Notification Codes
  7554.  */
  7555. #define LBN_ERRSPACE        (-2)
  7556. #define LBN_SELCHANGE       1
  7557. #define LBN_DBLCLK          2
  7558. #define LBN_SELCANCEL       3
  7559. #define LBN_SETFOCUS        4
  7560. #define LBN_KILLFOCUS       5
  7561.  
  7562.  
  7563.  
  7564. #ifndef NOWINMESSAGES
  7565.  
  7566. /*
  7567.  * Listbox messages
  7568.  */
  7569. #define LB_ADDSTRING            0x0180
  7570. #define LB_INSERTSTRING         0x0181
  7571. #define LB_DELETESTRING         0x0182
  7572. #define LB_SELITEMRANGEEX       0x0183
  7573. #define LB_RESETCONTENT         0x0184
  7574. #define LB_SETSEL               0x0185
  7575. #define LB_SETCURSEL            0x0186
  7576. #define LB_GETSEL               0x0187
  7577. #define LB_GETCURSEL            0x0188
  7578. #define LB_GETTEXT              0x0189
  7579. #define LB_GETTEXTLEN           0x018A
  7580. #define LB_GETCOUNT             0x018B
  7581. #define LB_SELECTSTRING         0x018C
  7582. #define LB_DIR                  0x018D
  7583. #define LB_GETTOPINDEX          0x018E
  7584. #define LB_FINDSTRING           0x018F
  7585. #define LB_GETSELCOUNT          0x0190
  7586. #define LB_GETSELITEMS          0x0191
  7587. #define LB_SETTABSTOPS          0x0192
  7588. #define LB_GETHORIZONTALEXTENT  0x0193
  7589. #define LB_SETHORIZONTALEXTENT  0x0194
  7590. #define LB_SETCOLUMNWIDTH       0x0195
  7591. #define LB_ADDFILE              0x0196
  7592. #define LB_SETTOPINDEX          0x0197
  7593. #define LB_GETITEMRECT          0x0198
  7594. #define LB_GETITEMDATA          0x0199
  7595. #define LB_SETITEMDATA          0x019A
  7596. #define LB_SELITEMRANGE         0x019B
  7597. #define LB_SETANCHORINDEX       0x019C
  7598. #define LB_GETANCHORINDEX       0x019D
  7599. #define LB_SETCARETINDEX        0x019E
  7600. #define LB_GETCARETINDEX        0x019F
  7601. #define LB_SETITEMHEIGHT        0x01A0
  7602. #define LB_GETITEMHEIGHT        0x01A1
  7603. #define LB_FINDSTRINGEXACT      0x01A2
  7604. #define LB_SETLOCALE            0x01A5
  7605. #define LB_GETLOCALE            0x01A6
  7606. #define LB_SETCOUNT             0x01A7
  7607. #if(WINVER >= 0x0400)
  7608. #define LB_INITSTORAGE          0x01A8
  7609. #define LB_ITEMFROMPOINT        0x01A9
  7610. #endif /* WINVER >= 0x0400 */
  7611. #if(WINVER >= 0x0400)
  7612. #define LB_MSGMAX               0x01B0
  7613. #else
  7614. #define LB_MSGMAX               0x01A8
  7615. #endif
  7616.  
  7617. #endif /* !NOWINMESSAGES */
  7618.  
  7619. #ifndef NOWINSTYLES
  7620.  
  7621. // begin_r_winuser
  7622.  
  7623. /*
  7624.  * Listbox Styles
  7625.  */
  7626. #define LBS_NOTIFY            0x0001L
  7627. #define LBS_SORT              0x0002L
  7628. #define LBS_NOREDRAW          0x0004L
  7629. #define LBS_MULTIPLESEL       0x0008L
  7630. #define LBS_OWNERDRAWFIXED    0x0010L
  7631. #define LBS_OWNERDRAWVARIABLE 0x0020L
  7632. #define LBS_HASSTRINGS        0x0040L
  7633. #define LBS_USETABSTOPS       0x0080L
  7634. #define LBS_NOINTEGRALHEIGHT  0x0100L
  7635. #define LBS_MULTICOLUMN       0x0200L
  7636. #define LBS_WANTKEYBOARDINPUT 0x0400L
  7637. #define LBS_EXTENDEDSEL       0x0800L
  7638. #define LBS_DISABLENOSCROLL   0x1000L
  7639. #define LBS_NODATA            0x2000L
  7640. #if(WINVER >= 0x0400)
  7641. #define LBS_NOSEL             0x4000L
  7642. #endif /* WINVER >= 0x0400 */
  7643. #define LBS_STANDARD          (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  7644.  
  7645. // end_r_winuser
  7646.  
  7647. #endif /* !NOWINSTYLES */
  7648.  
  7649.  
  7650. /*
  7651.  * Combo Box return Values
  7652.  */
  7653. #define CB_OKAY             0
  7654. #define CB_ERR              (-1)
  7655. #define CB_ERRSPACE         (-2)
  7656.  
  7657.  
  7658. /*
  7659.  * Combo Box Notification Codes
  7660.  */
  7661. #define CBN_ERRSPACE        (-1)
  7662. #define CBN_SELCHANGE       1
  7663. #define CBN_DBLCLK          2
  7664. #define CBN_SETFOCUS        3
  7665. #define CBN_KILLFOCUS       4
  7666. #define CBN_EDITCHANGE      5
  7667. #define CBN_EDITUPDATE      6
  7668. #define CBN_DROPDOWN        7
  7669. #define CBN_CLOSEUP         8
  7670. #define CBN_SELENDOK        9
  7671. #define CBN_SELENDCANCEL    10
  7672.  
  7673. #ifndef NOWINSTYLES
  7674. // begin_r_winuser
  7675.  
  7676. /*
  7677.  * Combo Box styles
  7678.  */
  7679. #define CBS_SIMPLE            0x0001L
  7680. #define CBS_DROPDOWN          0x0002L
  7681. #define CBS_DROPDOWNLIST      0x0003L
  7682. #define CBS_OWNERDRAWFIXED    0x0010L
  7683. #define CBS_OWNERDRAWVARIABLE 0x0020L
  7684. #define CBS_AUTOHSCROLL       0x0040L
  7685. #define CBS_OEMCONVERT        0x0080L
  7686. #define CBS_SORT              0x0100L
  7687. #define CBS_HASSTRINGS        0x0200L
  7688. #define CBS_NOINTEGRALHEIGHT  0x0400L
  7689. #define CBS_DISABLENOSCROLL   0x0800L
  7690. #if(WINVER >= 0x0400)
  7691. #define CBS_UPPERCASE           0x2000L
  7692. #define CBS_LOWERCASE           0x4000L
  7693. #endif /* WINVER >= 0x0400 */
  7694.  
  7695. // end_r_winuser
  7696. #endif  /* !NOWINSTYLES */
  7697.  
  7698.  
  7699. /*
  7700.  * Combo Box messages
  7701.  */
  7702. #ifndef NOWINMESSAGES
  7703. #define CB_GETEDITSEL               0x0140
  7704. #define CB_LIMITTEXT                0x0141
  7705. #define CB_SETEDITSEL               0x0142
  7706. #define CB_ADDSTRING                0x0143
  7707. #define CB_DELETESTRING             0x0144
  7708. #define CB_DIR                      0x0145
  7709. #define CB_GETCOUNT                 0x0146
  7710. #define CB_GETCURSEL                0x0147
  7711. #define CB_GETLBTEXT                0x0148
  7712. #define CB_GETLBTEXTLEN             0x0149
  7713. #define CB_INSERTSTRING             0x014A
  7714. #define CB_RESETCONTENT             0x014B
  7715. #define CB_FINDSTRING               0x014C
  7716. #define CB_SELECTSTRING             0x014D
  7717. #define CB_SETCURSEL                0x014E
  7718. #define CB_SHOWDROPDOWN             0x014F
  7719. #define CB_GETITEMDATA              0x0150
  7720. #define CB_SETITEMDATA              0x0151
  7721. #define CB_GETDROPPEDCONTROLRECT    0x0152
  7722. #define CB_SETITEMHEIGHT            0x0153
  7723. #define CB_GETITEMHEIGHT            0x0154
  7724. #define CB_SETEXTENDEDUI            0x0155
  7725. #define CB_GETEXTENDEDUI            0x0156
  7726. #define CB_GETDROPPEDSTATE          0x0157
  7727. #define CB_FINDSTRINGEXACT          0x0158
  7728. #define CB_SETLOCALE                0x0159
  7729. #define CB_GETLOCALE                0x015A
  7730. #if(WINVER >= 0x0400)
  7731. #define CB_GETTOPINDEX              0x015b
  7732. #define CB_SETTOPINDEX              0x015c
  7733. #define CB_GETHORIZONTALEXTENT      0x015d
  7734. #define CB_SETHORIZONTALEXTENT      0x015e
  7735. #define CB_GETDROPPEDWIDTH          0x015f
  7736. #define CB_SETDROPPEDWIDTH          0x0160
  7737. #define CB_INITSTORAGE              0x0161
  7738. #endif /* WINVER >= 0x0400 */
  7739. #if(WINVER >= 0x0400)
  7740. #define CB_MSGMAX                   0x0162
  7741. #else
  7742. #define CB_MSGMAX                   0x015B
  7743. #endif
  7744. #endif  /* !NOWINMESSAGES */
  7745.  
  7746.  
  7747.  
  7748. #ifndef NOWINSTYLES
  7749.  
  7750. // begin_r_winuser
  7751.  
  7752. /*
  7753.  * Scroll Bar Styles
  7754.  */
  7755. #define SBS_HORZ                    0x0000L
  7756. #define SBS_VERT                    0x0001L
  7757. #define SBS_TOPALIGN                0x0002L
  7758. #define SBS_LEFTALIGN               0x0002L
  7759. #define SBS_BOTTOMALIGN             0x0004L
  7760. #define SBS_RIGHTALIGN              0x0004L
  7761. #define SBS_SIZEBOXTOPLEFTALIGN     0x0002L
  7762. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  7763. #define SBS_SIZEBOX                 0x0008L
  7764. #if(WINVER >= 0x0400)
  7765. #define SBS_SIZEGRIP                0x0010L
  7766. #endif /* WINVER >= 0x0400 */
  7767.  
  7768. // end_r_winuser
  7769.  
  7770. #endif /* !NOWINSTYLES */
  7771.  
  7772. /*
  7773.  * Scroll bar messages
  7774.  */
  7775. #ifndef NOWINMESSAGES
  7776. #define SBM_SETPOS                  0x00E0 /*not in win3.1 */
  7777. #define SBM_GETPOS                  0x00E1 /*not in win3.1 */
  7778. #define SBM_SETRANGE                0x00E2 /*not in win3.1 */
  7779. #define SBM_SETRANGEREDRAW          0x00E6 /*not in win3.1 */
  7780. #define SBM_GETRANGE                0x00E3 /*not in win3.1 */
  7781. #define SBM_ENABLE_ARROWS           0x00E4 /*not in win3.1 */
  7782. #if(WINVER >= 0x0400)
  7783. #define SBM_SETSCROLLINFO           0x00E9
  7784. #define SBM_GETSCROLLINFO           0x00EA
  7785.  
  7786. #define SIF_RANGE           0x0001
  7787. #define SIF_PAGE            0x0002
  7788. #define SIF_POS             0x0004
  7789. #define SIF_DISABLENOSCROLL 0x0008
  7790. #define SIF_TRACKPOS        0x0010
  7791. #define SIF_ALL             (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
  7792.  
  7793. typedef struct tagSCROLLINFO
  7794. {
  7795.     UINT    cbSize;
  7796.     UINT    fMask;
  7797.     int     nMin;
  7798.     int     nMax;
  7799.     UINT    nPage;
  7800.     int     nPos;
  7801.     int     nTrackPos;
  7802. }   SCROLLINFO, FAR *LPSCROLLINFO;
  7803. typedef SCROLLINFO CONST FAR *LPCSCROLLINFO;
  7804.  
  7805. WINUSERAPI int     WINAPI SetScrollInfo(HWND, int, LPCSCROLLINFO, BOOL);
  7806. WINUSERAPI BOOL    WINAPI GetScrollInfo(HWND, int, LPSCROLLINFO);
  7807. #endif /* WINVER >= 0x0400 */
  7808. #endif /* !NOWINMESSAGES */
  7809. #endif /* !NOCTLMGR */
  7810.  
  7811. #ifndef NOMDI
  7812.  
  7813. /*
  7814.  * MDI client style bits
  7815.  */
  7816. #define MDIS_ALLCHILDSTYLES    0x0001
  7817.  
  7818. /*
  7819.  * wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
  7820.  */
  7821. #define MDITILE_VERTICAL       0x0000 /*not in win3.1 */
  7822. #define MDITILE_HORIZONTAL     0x0001 /*not in win3.1 */
  7823. #define MDITILE_SKIPDISABLED   0x0002 /*not in win3.1 */
  7824.  
  7825. typedef struct tagMDICREATESTRUCTA {
  7826.     LPCSTR   szClass;
  7827.     LPCSTR   szTitle;
  7828.     HANDLE hOwner;
  7829.     int x;
  7830.     int y;
  7831.     int cx;
  7832.     int cy;
  7833.     DWORD style;
  7834.     LPARAM lParam;        /* app-defined stuff */
  7835. } MDICREATESTRUCTA, *LPMDICREATESTRUCTA;
  7836. typedef struct tagMDICREATESTRUCTW {
  7837.     LPCWSTR  szClass;
  7838.     LPCWSTR  szTitle;
  7839.     HANDLE hOwner;
  7840.     int x;
  7841.     int y;
  7842.     int cx;
  7843.     int cy;
  7844.     DWORD style;
  7845.     LPARAM lParam;        /* app-defined stuff */
  7846. } MDICREATESTRUCTW, *LPMDICREATESTRUCTW;
  7847. #ifdef UNICODE
  7848. typedef MDICREATESTRUCTW MDICREATESTRUCT;
  7849. typedef LPMDICREATESTRUCTW LPMDICREATESTRUCT;
  7850. #else
  7851. typedef MDICREATESTRUCTA MDICREATESTRUCT;
  7852. typedef LPMDICREATESTRUCTA LPMDICREATESTRUCT;
  7853. #endif // UNICODE
  7854.  
  7855. typedef struct tagCLIENTCREATESTRUCT {
  7856.     HANDLE hWindowMenu;
  7857.     UINT idFirstChild;
  7858. } CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
  7859.  
  7860. WINUSERAPI
  7861. LRESULT
  7862. WINAPI
  7863. DefFrameProcA(
  7864.     HWND hWnd,
  7865.     HWND hWndMDIClient ,
  7866.     UINT uMsg,
  7867.     WPARAM wParam,
  7868.     LPARAM lParam);
  7869. WINUSERAPI
  7870. LRESULT
  7871. WINAPI
  7872. DefFrameProcW(
  7873.     HWND hWnd,
  7874.     HWND hWndMDIClient ,
  7875.     UINT uMsg,
  7876.     WPARAM wParam,
  7877.     LPARAM lParam);
  7878. #ifdef UNICODE
  7879. #define DefFrameProc  DefFrameProcW
  7880. #else
  7881. #define DefFrameProc  DefFrameProcA
  7882. #endif // !UNICODE
  7883.  
  7884. WINUSERAPI
  7885. LRESULT
  7886. WINAPI
  7887. DefMDIChildProcA(
  7888.     HWND hWnd,
  7889.     UINT uMsg,
  7890.     WPARAM wParam,
  7891.     LPARAM lParam);
  7892. WINUSERAPI
  7893. LRESULT
  7894. WINAPI
  7895. DefMDIChildProcW(
  7896.     HWND hWnd,
  7897.     UINT uMsg,
  7898.     WPARAM wParam,
  7899.     LPARAM lParam);
  7900. #ifdef UNICODE
  7901. #define DefMDIChildProc  DefMDIChildProcW
  7902. #else
  7903. #define DefMDIChildProc  DefMDIChildProcA
  7904. #endif // !UNICODE
  7905.  
  7906. #ifndef NOMSG
  7907.  
  7908. WINUSERAPI
  7909. BOOL
  7910. WINAPI
  7911. TranslateMDISysAccel(
  7912.     HWND hWndClient,
  7913.     LPMSG lpMsg);
  7914.  
  7915. #endif /* !NOMSG */
  7916.  
  7917. WINUSERAPI
  7918. UINT
  7919. WINAPI
  7920. ArrangeIconicWindows(
  7921.     HWND hWnd);
  7922.  
  7923. WINUSERAPI
  7924. HWND
  7925. WINAPI
  7926. CreateMDIWindowA(
  7927.     LPSTR lpClassName,
  7928.     LPSTR lpWindowName,
  7929.     DWORD dwStyle,
  7930.     int X,
  7931.     int Y,
  7932.     int nWidth,
  7933.     int nHeight,
  7934.     HWND hWndParent,
  7935.     HINSTANCE hInstance,
  7936.     LPARAM lParam
  7937.     );
  7938. WINUSERAPI
  7939. HWND
  7940. WINAPI
  7941. CreateMDIWindowW(
  7942.     LPWSTR lpClassName,
  7943.     LPWSTR lpWindowName,
  7944.     DWORD dwStyle,
  7945.     int X,
  7946.     int Y,
  7947.     int nWidth,
  7948.     int nHeight,
  7949.     HWND hWndParent,
  7950.     HINSTANCE hInstance,
  7951.     LPARAM lParam
  7952.     );
  7953. #ifdef UNICODE
  7954. #define CreateMDIWindow  CreateMDIWindowW
  7955. #else
  7956. #define CreateMDIWindow  CreateMDIWindowA
  7957. #endif // !UNICODE
  7958.  
  7959. #if(WINVER >= 0x0400)
  7960. WINUSERAPI WORD    WINAPI TileWindows(HWND hwndParent, UINT wHow, CONST RECT * lpRect, UINT cKids, const HWND FAR * lpKids);
  7961. WINUSERAPI WORD    WINAPI CascadeWindows(HWND hwndParent, UINT wHow, CONST RECT * lpRect, UINT cKids,  const HWND FAR * lpKids);
  7962. #endif /* WINVER >= 0x0400 */
  7963. #endif /* !NOMDI */
  7964.  
  7965. #endif /* !NOUSER */
  7966.  
  7967. /****** Help support ********************************************************/
  7968.  
  7969. #ifndef NOHELP
  7970.  
  7971. typedef DWORD HELPPOLY;
  7972. typedef struct tagMULTIKEYHELPA {
  7973.     DWORD  mkSize;
  7974.     CHAR   mkKeylist;
  7975.     CHAR   szKeyphrase[1];
  7976. } MULTIKEYHELPA, *PMULTIKEYHELPA, *LPMULTIKEYHELPA;
  7977. typedef struct tagMULTIKEYHELPW {
  7978.     DWORD  mkSize;
  7979.     WCHAR  mkKeylist;
  7980.     WCHAR  szKeyphrase[1];
  7981. } MULTIKEYHELPW, *PMULTIKEYHELPW, *LPMULTIKEYHELPW;
  7982. #ifdef UNICODE
  7983. typedef MULTIKEYHELPW MULTIKEYHELP;
  7984. typedef PMULTIKEYHELPW PMULTIKEYHELP;
  7985. typedef LPMULTIKEYHELPW LPMULTIKEYHELP;
  7986. #else
  7987. typedef MULTIKEYHELPA MULTIKEYHELP;
  7988. typedef PMULTIKEYHELPA PMULTIKEYHELP;
  7989. typedef LPMULTIKEYHELPA LPMULTIKEYHELP;
  7990. #endif // UNICODE
  7991.  
  7992. typedef struct tagHELPWININFOA {
  7993.     int  wStructSize;
  7994.     int  x;
  7995.     int  y;
  7996.     int  dx;
  7997.     int  dy;
  7998.     int  wMax;
  7999.     CHAR   rgchMember[2];
  8000. } HELPWININFOA, *PHELPWININFOA, *LPHELPWININFOA;
  8001. typedef struct tagHELPWININFOW {
  8002.     int  wStructSize;
  8003.     int  x;
  8004.     int  y;
  8005.     int  dx;
  8006.     int  dy;
  8007.     int  wMax;
  8008.     WCHAR  rgchMember[2];
  8009. } HELPWININFOW, *PHELPWININFOW, *LPHELPWININFOW;
  8010. #ifdef UNICODE
  8011. typedef HELPWININFOW HELPWININFO;
  8012. typedef PHELPWININFOW PHELPWININFO;
  8013. typedef LPHELPWININFOW LPHELPWININFO;
  8014. #else
  8015. typedef HELPWININFOA HELPWININFO;
  8016. typedef PHELPWININFOA PHELPWININFO;
  8017. typedef LPHELPWININFOA LPHELPWININFO;
  8018. #endif // UNICODE
  8019.  
  8020. // begin_r_winuser
  8021.  
  8022. /*
  8023.  * Commands to pass to WinHelp()
  8024.  */
  8025. #define HELP_CONTEXT      0x0001L  /* Display topic in ulTopic */
  8026. #define HELP_QUIT         0x0002L  /* Terminate help */
  8027. #define HELP_INDEX        0x0003L  /* Display index */
  8028. #define HELP_CONTENTS     0x0003L
  8029. #define HELP_HELPONHELP   0x0004L  /* Display help on using help */
  8030. #define HELP_SETINDEX     0x0005L  /* Set current Index for multi index help */
  8031. #define HELP_SETCONTENTS  0x0005L
  8032. #define HELP_CONTEXTPOPUP 0x0008L
  8033. #define HELP_FORCEFILE    0x0009L
  8034. #define HELP_KEY          0x0101L  /* Display topic for keyword in offabData */
  8035. #define HELP_COMMAND      0x0102L
  8036. #define HELP_PARTIALKEY   0x0105L
  8037. #define HELP_MULTIKEY     0x0201L
  8038. #define HELP_SETWINPOS    0x0203L
  8039. #if(WINVER >= 0x0400)
  8040. #define HELP_CONTEXTMENU  0x000a
  8041. #define HELP_FINDER       0x000b
  8042. #define HELP_WM_HELP      0x000c
  8043. #define HELP_SETPOPUP_POS 0x000d
  8044.  
  8045. #define HELP_TCARD              0x8000
  8046. #define HELP_TCARD_DATA         0x0010
  8047. #define HELP_TCARD_OTHER_CALLER 0x0011
  8048.  
  8049. // These are in winhelp.h in Win95.
  8050. #define IDH_NO_HELP                     28440
  8051. #define IDH_MISSING_CONTEXT             28441 // Control doesn't have matching help context
  8052. #define IDH_GENERIC_HELP_BUTTON         28442 // Property sheet help button
  8053. #define IDH_OK                          28443
  8054. #define IDH_CANCEL                      28444
  8055. #define IDH_HELP                        28445
  8056.  
  8057. #endif /* WINVER >= 0x0400 */
  8058.  
  8059. // end_r_winuser
  8060.  
  8061.  
  8062. WINUSERAPI
  8063. BOOL
  8064. WINAPI
  8065. WinHelpA(
  8066.     HWND hWndMain,
  8067.     LPCSTR lpszHelp,
  8068.     UINT uCommand,
  8069.     DWORD dwData
  8070.     );
  8071. WINUSERAPI
  8072. BOOL
  8073. WINAPI
  8074. WinHelpW(
  8075.     HWND hWndMain,
  8076.     LPCWSTR lpszHelp,
  8077.     UINT uCommand,
  8078.     DWORD dwData
  8079.     );
  8080. #ifdef UNICODE
  8081. #define WinHelp  WinHelpW
  8082. #else
  8083. #define WinHelp  WinHelpA
  8084. #endif // !UNICODE
  8085.  
  8086. #endif /* !NOHELP */
  8087.  
  8088. #ifndef NOSYSPARAMSINFO
  8089.  
  8090. /*
  8091.  * Parameter for SystemParametersInfo()
  8092.  */
  8093.  
  8094. #define SPI_GETBEEP                 1
  8095. #define SPI_SETBEEP                 2
  8096. #define SPI_GETMOUSE                3
  8097. #define SPI_SETMOUSE                4
  8098. #define SPI_GETBORDER               5
  8099. #define SPI_SETBORDER               6
  8100. #define SPI_GETKEYBOARDSPEED       10
  8101. #define SPI_SETKEYBOARDSPEED       11
  8102. #define SPI_LANGDRIVER             12
  8103. #define SPI_ICONHORIZONTALSPACING  13
  8104. #define SPI_GETSCREENSAVETIMEOUT   14
  8105. #define SPI_SETSCREENSAVETIMEOUT   15
  8106. #define SPI_GETSCREENSAVEACTIVE    16
  8107. #define SPI_SETSCREENSAVEACTIVE    17
  8108. #define SPI_GETGRIDGRANULARITY     18
  8109. #define SPI_SETGRIDGRANULARITY     19
  8110. #define SPI_SETDESKWALLPAPER       20
  8111. #define SPI_SETDESKPATTERN         21
  8112. #define SPI_GETKEYBOARDDELAY       22
  8113. #define SPI_SETKEYBOARDDELAY       23
  8114. #define SPI_ICONVERTICALSPACING    24
  8115. #define SPI_GETICONTITLEWRAP       25
  8116. #define SPI_SETICONTITLEWRAP       26
  8117. #define SPI_GETMENUDROPALIGNMENT   27
  8118. #define SPI_SETMENUDROPALIGNMENT   28
  8119. #define SPI_SETDOUBLECLKWIDTH      29
  8120. #define SPI_SETDOUBLECLKHEIGHT     30
  8121. #define SPI_GETICONTITLELOGFONT    31
  8122. #define SPI_SETDOUBLECLICKTIME     32
  8123. #define SPI_SETMOUSEBUTTONSWAP     33
  8124. #define SPI_SETICONTITLELOGFONT    34
  8125. #define SPI_GETFASTTASKSWITCH      35
  8126. #define SPI_SETFASTTASKSWITCH      36
  8127. #if(WINVER >= 0x0400)
  8128. #define SPI_SETDRAGFULLWINDOWS     37
  8129. #define SPI_GETDRAGFULLWINDOWS     38
  8130. #define SPI_GETNONCLIENTMETRICS    41
  8131. #define SPI_SETNONCLIENTMETRICS    42
  8132. #define SPI_GETMINIMIZEDMETRICS    43
  8133. #define SPI_SETMINIMIZEDMETRICS    44
  8134. #define SPI_GETICONMETRICS         45
  8135. #define SPI_SETICONMETRICS         46
  8136. #define SPI_SETWORKAREA            47
  8137. #define SPI_GETWORKAREA            48
  8138. #define SPI_SETPENWINDOWS          49
  8139.  
  8140. #define SPI_GETHIGHCONTRAST        66
  8141. #define SPI_SETHIGHCONTRAST        67
  8142. #define SPI_GETKEYBOARDPREF        68
  8143. #define SPI_SETKEYBOARDPREF        69
  8144. #define SPI_GETSCREENREADER        70
  8145. #define SPI_SETSCREENREADER        71
  8146. #define SPI_GETANIMATION           72
  8147. #define SPI_SETANIMATION           73
  8148. #define SPI_GETFONTSMOOTHING       74
  8149. #define SPI_SETFONTSMOOTHING       75
  8150. #define SPI_SETDRAGWIDTH           76
  8151. #define SPI_SETDRAGHEIGHT          77
  8152. #define SPI_SETHANDHELD            78
  8153. #define SPI_GETLOWPOWERTIMEOUT     79
  8154. #define SPI_GETPOWEROFFTIMEOUT     80
  8155. #define SPI_SETLOWPOWERTIMEOUT     81
  8156. #define SPI_SETPOWEROFFTIMEOUT     82
  8157. #define SPI_GETLOWPOWERACTIVE      83
  8158. #define SPI_GETPOWEROFFACTIVE      84
  8159. #define SPI_SETLOWPOWERACTIVE      85
  8160. #define SPI_SETPOWEROFFACTIVE      86
  8161. #define SPI_SETCURSORS             87
  8162. #define SPI_SETICONS               88
  8163. #define SPI_GETDEFAULTINPUTLANG    89
  8164. #define SPI_SETDEFAULTINPUTLANG    90
  8165. #define SPI_SETLANGTOGGLE          91
  8166. #define SPI_GETWINDOWSEXTENSION    92
  8167. #define SPI_SETMOUSETRAILS         93
  8168. #define SPI_GETMOUSETRAILS         94
  8169. #define SPI_SCREENSAVERRUNNING     97
  8170. #endif /* WINVER >= 0x0400 */
  8171. #define SPI_GETFILTERKEYS          50
  8172. #define SPI_SETFILTERKEYS          51
  8173. #define SPI_GETTOGGLEKEYS          52
  8174. #define SPI_SETTOGGLEKEYS          53
  8175. #define SPI_GETMOUSEKEYS           54
  8176. #define SPI_SETMOUSEKEYS           55
  8177. #define SPI_GETSHOWSOUNDS          56
  8178. #define SPI_SETSHOWSOUNDS          57
  8179. #define SPI_GETSTICKYKEYS          58
  8180. #define SPI_SETSTICKYKEYS          59
  8181. #define SPI_GETACCESSTIMEOUT       60
  8182. #define SPI_SETACCESSTIMEOUT       61
  8183. #if(WINVER >= 0x0400)
  8184. #define SPI_GETSERIALKEYS          62
  8185. #define SPI_SETSERIALKEYS          63
  8186. #endif /* WINVER >= 0x0400 */
  8187. #define SPI_GETSOUNDSENTRY         64
  8188. #define SPI_SETSOUNDSENTRY         65
  8189. #if(_WIN32_WINNT >= 0x0400)
  8190. #define SPI_GETSNAPTODEFBUTTON     95
  8191. #define SPI_SETSNAPTODEFBUTTON     96
  8192. #define SPI_GETMOUSEHOVERWIDTH     98
  8193. #define SPI_SETMOUSEHOVERWIDTH     99
  8194. #define SPI_GETMOUSEHOVERHEIGHT   100
  8195. #define SPI_SETMOUSEHOVERHEIGHT   101
  8196. #define SPI_GETMOUSEHOVERTIME     102
  8197. #define SPI_SETMOUSEHOVERTIME     103
  8198. #define SPI_GETWHEELSCROLLLINES   104
  8199. #define SPI_SETWHEELSCROLLLINES   105
  8200.  
  8201. #endif /* _WIN32_WINNT >= 0x0400 */
  8202.  
  8203. /*
  8204.  * SPI User Preferences.
  8205.  */
  8206.  
  8207. /*
  8208.  * Flags
  8209.  */
  8210. #define SPIF_UPDATEINIFILE    0x0001
  8211. #define SPIF_SENDWININICHANGE 0x0002
  8212. #define SPIF_SENDCHANGE       SPIF_SENDWININICHANGE
  8213.  
  8214.  
  8215. #define METRICS_USEDEFAULT -1
  8216. #ifdef _WINGDI_
  8217. #ifndef NOGDI
  8218. typedef struct tagNONCLIENTMETRICSA
  8219. {
  8220.     UINT    cbSize;
  8221.     int     iBorderWidth;
  8222.     int     iScrollWidth;
  8223.     int     iScrollHeight;
  8224.     int     iCaptionWidth;
  8225.     int     iCaptionHeight;
  8226.     LOGFONTA lfCaptionFont;
  8227.     int     iSmCaptionWidth;
  8228.     int     iSmCaptionHeight;
  8229.     LOGFONTA lfSmCaptionFont;
  8230.     int     iMenuWidth;
  8231.     int     iMenuHeight;
  8232.     LOGFONTA lfMenuFont;
  8233.     LOGFONTA lfStatusFont;
  8234.     LOGFONTA lfMessageFont;
  8235. }   NONCLIENTMETRICSA, *PNONCLIENTMETRICSA, FAR* LPNONCLIENTMETRICSA;
  8236. typedef struct tagNONCLIENTMETRICSW
  8237. {
  8238.     UINT    cbSize;
  8239.     int     iBorderWidth;
  8240.     int     iScrollWidth;
  8241.     int     iScrollHeight;
  8242.     int     iCaptionWidth;
  8243.     int     iCaptionHeight;
  8244.     LOGFONTW lfCaptionFont;
  8245.     int     iSmCaptionWidth;
  8246.     int     iSmCaptionHeight;
  8247.     LOGFONTW lfSmCaptionFont;
  8248.     int     iMenuWidth;
  8249.     int     iMenuHeight;
  8250.     LOGFONTW lfMenuFont;
  8251.     LOGFONTW lfStatusFont;
  8252.     LOGFONTW lfMessageFont;
  8253. }   NONCLIENTMETRICSW, *PNONCLIENTMETRICSW, FAR* LPNONCLIENTMETRICSW;
  8254. #ifdef UNICODE
  8255. typedef NONCLIENTMETRICSW NONCLIENTMETRICS;
  8256. typedef PNONCLIENTMETRICSW PNONCLIENTMETRICS;
  8257. typedef LPNONCLIENTMETRICSW LPNONCLIENTMETRICS;
  8258. #else
  8259. typedef NONCLIENTMETRICSA NONCLIENTMETRICS;
  8260. typedef PNONCLIENTMETRICSA PNONCLIENTMETRICS;
  8261. typedef LPNONCLIENTMETRICSA LPNONCLIENTMETRICS;
  8262. #endif // UNICODE
  8263. #endif /* NOGDI */
  8264. #endif /* _WINGDI_ */
  8265.  
  8266. #define ARW_BOTTOMLEFT              0x0000L
  8267. #define ARW_BOTTOMRIGHT             0x0001L
  8268. #define ARW_TOPLEFT                 0x0002L
  8269. #define ARW_TOPRIGHT                0x0003L
  8270. #define ARW_STARTMASK               0x0003L
  8271. #define ARW_STARTRIGHT              0x0001L
  8272. #define ARW_STARTTOP                0x0002L
  8273.  
  8274. #define ARW_LEFT                    0x0000L
  8275. #define ARW_RIGHT                   0x0000L
  8276. #define ARW_UP                      0x0004L
  8277. #define ARW_DOWN                    0x0004L
  8278. #define ARW_HIDE                    0x0008L
  8279. #define ARW_VALID                   0x000FL
  8280.  
  8281. typedef struct tagMINIMIZEDMETRICS
  8282. {
  8283.     UINT    cbSize;
  8284.     int     iWidth;
  8285.     int     iHorzGap;
  8286.     int     iVertGap;
  8287.     int     iArrange;
  8288. }   MINIMIZEDMETRICS, *PMINIMIZEDMETRICS, *LPMINIMIZEDMETRICS;
  8289.  
  8290. #ifdef _WINGDI_
  8291. #ifndef NOGDI
  8292. typedef struct tagICONMETRICSA
  8293. {
  8294.     UINT    cbSize;
  8295.     int     iHorzSpacing;
  8296.     int     iVertSpacing;
  8297.     int     iTitleWrap;
  8298.     LOGFONTA lfFont;
  8299. }   ICONMETRICSA, *PICONMETRICSA, *LPICONMETRICSA;
  8300. typedef struct tagICONMETRICSW
  8301. {
  8302.     UINT    cbSize;
  8303.     int     iHorzSpacing;
  8304.     int     iVertSpacing;
  8305.     int     iTitleWrap;
  8306.     LOGFONTW lfFont;
  8307. }   ICONMETRICSW, *PICONMETRICSW, *LPICONMETRICSW;
  8308. #ifdef UNICODE
  8309. typedef ICONMETRICSW ICONMETRICS;
  8310. typedef PICONMETRICSW PICONMETRICS;
  8311. typedef LPICONMETRICSW LPICONMETRICS;
  8312. #else
  8313. typedef ICONMETRICSA ICONMETRICS;
  8314. typedef PICONMETRICSA PICONMETRICS;
  8315. typedef LPICONMETRICSA LPICONMETRICS;
  8316. #endif // UNICODE
  8317. #endif /* NOGDI */
  8318. #endif /* _WINGDI_ */
  8319.  
  8320. typedef struct tagANIMATIONINFO
  8321. {
  8322.     UINT    cbSize;
  8323.     int     iMinAnimate;
  8324. }   ANIMATIONINFO, *LPANIMATIONINFO;
  8325.  
  8326. typedef struct tagSERIALKEYSA
  8327. {
  8328.     UINT    cbSize;
  8329.     DWORD   dwFlags;
  8330.     LPSTR     lpszActivePort;
  8331.     LPSTR     lpszPort;
  8332.     UINT    iBaudRate;
  8333.     UINT    iPortState;
  8334.     UINT    iActive;
  8335. }   SERIALKEYSA, *LPSERIALKEYSA;
  8336. typedef struct tagSERIALKEYSW
  8337. {
  8338.     UINT    cbSize;
  8339.     DWORD   dwFlags;
  8340.     LPWSTR    lpszActivePort;
  8341.     LPWSTR    lpszPort;
  8342.     UINT    iBaudRate;
  8343.     UINT    iPortState;
  8344.     UINT    iActive;
  8345. }   SERIALKEYSW, *LPSERIALKEYSW;
  8346. #ifdef UNICODE
  8347. typedef SERIALKEYSW SERIALKEYS;
  8348. typedef LPSERIALKEYSW LPSERIALKEYS;
  8349. #else
  8350. typedef SERIALKEYSA SERIALKEYS;
  8351. typedef LPSERIALKEYSA LPSERIALKEYS;
  8352. #endif // UNICODE
  8353.  
  8354. /* flags for SERIALKEYS dwFlags field */
  8355. #define SERKF_SERIALKEYSON  0x00000001
  8356. #define SERKF_AVAILABLE     0x00000002
  8357. #define SERKF_INDICATOR     0x00000004
  8358.  
  8359.  
  8360. typedef struct tagHIGHCONTRASTA
  8361. {
  8362.     UINT    cbSize;
  8363.     DWORD   dwFlags;
  8364.     LPSTR   lpszDefaultScheme;
  8365. }   HIGHCONTRASTA, *LPHIGHCONTRASTA;
  8366. typedef struct tagHIGHCONTRASTW
  8367. {
  8368.     UINT    cbSize;
  8369.     DWORD   dwFlags;
  8370.     LPWSTR  lpszDefaultScheme;
  8371. }   HIGHCONTRASTW, *LPHIGHCONTRASTW;
  8372. #ifdef UNICODE
  8373. typedef HIGHCONTRASTW HIGHCONTRAST;
  8374. typedef LPHIGHCONTRASTW LPHIGHCONTRAST;
  8375. #else
  8376. typedef HIGHCONTRASTA HIGHCONTRAST;
  8377. typedef LPHIGHCONTRASTA LPHIGHCONTRAST;
  8378. #endif // UNICODE
  8379.  
  8380. /* flags for HIGHCONTRAST dwFlags field */
  8381. #define HCF_HIGHCONTRASTON  0x00000001
  8382. #define HCF_AVAILABLE       0x00000002
  8383. #define HCF_HOTKEYACTIVE    0x00000004
  8384. #define HCF_CONFIRMHOTKEY   0x00000008
  8385. #define HCF_HOTKEYSOUND     0x00000010
  8386. #define HCF_INDICATOR       0x00000020
  8387. #define HCF_HOTKEYAVAILABLE 0x00000040
  8388.  
  8389. /* Flags for ChangeDisplaySettings */
  8390. #define CDS_UPDATEREGISTRY  0x00000001
  8391. #define CDS_TEST            0x00000002
  8392. #define CDS_FULLSCREEN      0x00000004
  8393. #define CDS_GLOBAL          0x00000008
  8394. #define CDS_SET_PRIMARY     0x00000010
  8395. #define CDS_RESET           0x40000000
  8396. #define CDS_SETRECT         0x20000000
  8397. #define CDS_NORESET         0x10000000
  8398.  
  8399. /* Return values for ChangeDisplaySettings */
  8400. #define DISP_CHANGE_SUCCESSFUL       0
  8401. #define DISP_CHANGE_RESTART          1
  8402. #define DISP_CHANGE_FAILED          -1
  8403. #define DISP_CHANGE_BADMODE         -2
  8404. #define DISP_CHANGE_NOTUPDATED      -3
  8405. #define DISP_CHANGE_BADFLAGS        -4
  8406. #define DISP_CHANGE_BADPARAM        -5
  8407.  
  8408. #ifdef _WINGDI_
  8409. #ifndef NOGDI
  8410.  
  8411. WINUSERAPI
  8412. LONG
  8413. WINAPI
  8414. ChangeDisplaySettingsA(
  8415.     LPDEVMODEA  lpDevMode,
  8416.     DWORD       dwFlags);
  8417. WINUSERAPI
  8418. LONG
  8419. WINAPI
  8420. ChangeDisplaySettingsW(
  8421.     LPDEVMODEW  lpDevMode,
  8422.     DWORD       dwFlags);
  8423. #ifdef UNICODE
  8424. #define ChangeDisplaySettings  ChangeDisplaySettingsW
  8425. #else
  8426. #define ChangeDisplaySettings  ChangeDisplaySettingsA
  8427. #endif // !UNICODE
  8428.  
  8429. WINUSERAPI
  8430. LONG
  8431. WINAPI
  8432. ChangeDisplaySettingsExA(
  8433.     LPCSTR    lpszDeviceName,
  8434.     LPDEVMODEA  lpDevMode,
  8435.     HWND        hwnd,
  8436.     DWORD       dwflags,
  8437.     LPVOID      lParam);
  8438. WINUSERAPI
  8439. LONG
  8440. WINAPI
  8441. ChangeDisplaySettingsExW(
  8442.     LPCWSTR    lpszDeviceName,
  8443.     LPDEVMODEW  lpDevMode,
  8444.     HWND        hwnd,
  8445.     DWORD       dwflags,
  8446.     LPVOID      lParam);
  8447. #ifdef UNICODE
  8448. #define ChangeDisplaySettingsEx  ChangeDisplaySettingsExW
  8449. #else
  8450. #define ChangeDisplaySettingsEx  ChangeDisplaySettingsExA
  8451. #endif // !UNICODE
  8452.  
  8453. #define ENUM_CURRENT_SETTINGS       ((DWORD)-1)
  8454. #define ENUM_REGISTRY_SETTINGS      ((DWORD)-2)
  8455.  
  8456. WINUSERAPI
  8457. BOOL
  8458. WINAPI
  8459. EnumDisplaySettingsA(
  8460.     LPCSTR lpszDeviceName,
  8461.     DWORD iModeNum,
  8462.     LPDEVMODEA lpDevMode);
  8463. WINUSERAPI
  8464. BOOL
  8465. WINAPI
  8466. EnumDisplaySettingsW(
  8467.     LPCWSTR lpszDeviceName,
  8468.     DWORD iModeNum,
  8469.     LPDEVMODEW lpDevMode);
  8470. #ifdef UNICODE
  8471. #define EnumDisplaySettings  EnumDisplaySettingsW
  8472. #else
  8473. #define EnumDisplaySettings  EnumDisplaySettingsA
  8474. #endif // !UNICODE
  8475.  
  8476.  
  8477. #endif /* NOGDI */
  8478. #endif /* _WINGDI_ */
  8479.  
  8480.  
  8481. WINUSERAPI
  8482. BOOL
  8483. WINAPI
  8484. SystemParametersInfoA(
  8485.     UINT uiAction,
  8486.     UINT uiParam,
  8487.     PVOID pvParam,
  8488.     UINT fWinIni);
  8489. WINUSERAPI
  8490. BOOL
  8491. WINAPI
  8492. SystemParametersInfoW(
  8493.     UINT uiAction,
  8494.     UINT uiParam,
  8495.     PVOID pvParam,
  8496.     UINT fWinIni);
  8497. #ifdef UNICODE
  8498. #define SystemParametersInfo  SystemParametersInfoW
  8499. #else
  8500. #define SystemParametersInfo  SystemParametersInfoA
  8501. #endif // !UNICODE
  8502.  
  8503. #endif  /* !NOSYSPARAMSINFO  */
  8504.  
  8505. /*
  8506.  * Accessibility support
  8507.  */
  8508. typedef struct tagFILTERKEYS
  8509. {
  8510.     UINT  cbSize;
  8511.     DWORD dwFlags;
  8512.     DWORD iWaitMSec;            // Acceptance Delay
  8513.     DWORD iDelayMSec;           // Delay Until Repeat
  8514.     DWORD iRepeatMSec;          // Repeat Rate
  8515.     DWORD iBounceMSec;          // Debounce Time
  8516. } FILTERKEYS, *LPFILTERKEYS;
  8517.  
  8518. /*
  8519.  * FILTERKEYS dwFlags field
  8520.  */
  8521. #define FKF_FILTERKEYSON    0x00000001
  8522. #define FKF_AVAILABLE       0x00000002
  8523. #define FKF_HOTKEYACTIVE    0x00000004
  8524. #define FKF_CONFIRMHOTKEY   0x00000008
  8525. #define FKF_HOTKEYSOUND     0x00000010
  8526. #define FKF_INDICATOR       0x00000020
  8527. #define FKF_CLICKON         0x00000040
  8528.  
  8529. typedef struct tagSTICKYKEYS
  8530. {
  8531.     UINT  cbSize;
  8532.     DWORD dwFlags;
  8533. } STICKYKEYS, *LPSTICKYKEYS;
  8534.  
  8535. /*
  8536.  * STICKYKEYS dwFlags field
  8537.  */
  8538. #define SKF_STICKYKEYSON    0x00000001
  8539. #define SKF_AVAILABLE       0x00000002
  8540. #define SKF_HOTKEYACTIVE    0x00000004
  8541. #define SKF_CONFIRMHOTKEY   0x00000008
  8542. #define SKF_HOTKEYSOUND     0x00000010
  8543. #define SKF_INDICATOR       0x00000020
  8544. #define SKF_AUDIBLEFEEDBACK 0x00000040
  8545. #define SKF_TRISTATE        0x00000080
  8546. #define SKF_TWOKEYSOFF      0x00000100
  8547.  
  8548. typedef struct tagMOUSEKEYS
  8549. {
  8550.     UINT cbSize;
  8551.     DWORD dwFlags;
  8552.     DWORD iMaxSpeed;
  8553.     DWORD iTimeToMaxSpeed;
  8554.     DWORD iCtrlSpeed;
  8555.     DWORD dwReserved1;
  8556.     DWORD dwReserved2;
  8557. } MOUSEKEYS, *LPMOUSEKEYS;
  8558.  
  8559. /*
  8560.  * MOUSEKEYS dwFlags field
  8561.  */
  8562. #define MKF_MOUSEKEYSON     0x00000001
  8563. #define MKF_AVAILABLE       0x00000002
  8564. #define MKF_HOTKEYACTIVE    0x00000004
  8565. #define MKF_CONFIRMHOTKEY   0x00000008
  8566. #define MKF_HOTKEYSOUND     0x00000010
  8567. #define MKF_INDICATOR       0x00000020
  8568. #define MKF_MODIFIERS       0x00000040
  8569. #define MKF_REPLACENUMBERS  0x00000080
  8570.  
  8571. typedef struct tagACCESSTIMEOUT
  8572. {
  8573.     UINT  cbSize;
  8574.     DWORD dwFlags;
  8575.     DWORD iTimeOutMSec;
  8576. } ACCESSTIMEOUT, *LPACCESSTIMEOUT;
  8577.  
  8578. /*
  8579.  * ACCESSTIMEOUT dwFlags field
  8580.  */
  8581. #define ATF_TIMEOUTON       0x00000001
  8582. #define ATF_ONOFFFEEDBACK   0x00000002
  8583.  
  8584. /* values for SOUNDSENTRY iFSGrafEffect field */
  8585. #define SSGF_NONE       0
  8586. #define SSGF_DISPLAY    3
  8587.  
  8588. /* values for SOUNDSENTRY iFSTextEffect field */
  8589. #define SSTF_NONE       0
  8590. #define SSTF_CHARS      1
  8591. #define SSTF_BORDER     2
  8592. #define SSTF_DISPLAY    3
  8593.  
  8594. /* values for SOUNDSENTRY iWindowsEffect field */
  8595. #define SSWF_NONE     0
  8596. #define SSWF_TITLE    1
  8597. #define SSWF_WINDOW   2
  8598. #define SSWF_DISPLAY  3
  8599. #define SSWF_CUSTOM   4
  8600.  
  8601. typedef struct tagSOUNDSENTRYA
  8602. {
  8603.     UINT cbSize;
  8604.     DWORD dwFlags;
  8605.     DWORD iFSTextEffect;
  8606.     DWORD iFSTextEffectMSec;
  8607.     DWORD iFSTextEffectColorBits;
  8608.     DWORD iFSGrafEffect;
  8609.     DWORD iFSGrafEffectMSec;
  8610.     DWORD iFSGrafEffectColor;
  8611.     DWORD iWindowsEffect;
  8612.     DWORD iWindowsEffectMSec;
  8613.     LPSTR   lpszWindowsEffectDLL;
  8614.     DWORD iWindowsEffectOrdinal;
  8615. } SOUNDSENTRYA, *LPSOUNDSENTRYA;
  8616. typedef struct tagSOUNDSENTRYW
  8617. {
  8618.     UINT cbSize;
  8619.     DWORD dwFlags;
  8620.     DWORD iFSTextEffect;
  8621.     DWORD iFSTextEffectMSec;
  8622.     DWORD iFSTextEffectColorBits;
  8623.     DWORD iFSGrafEffect;
  8624.     DWORD iFSGrafEffectMSec;
  8625.     DWORD iFSGrafEffectColor;
  8626.     DWORD iWindowsEffect;
  8627.     DWORD iWindowsEffectMSec;
  8628.     LPWSTR  lpszWindowsEffectDLL;
  8629.     DWORD iWindowsEffectOrdinal;
  8630. } SOUNDSENTRYW, *LPSOUNDSENTRYW;
  8631. #ifdef UNICODE
  8632. typedef SOUNDSENTRYW SOUNDSENTRY;
  8633. typedef LPSOUNDSENTRYW LPSOUNDSENTRY;
  8634. #else
  8635. typedef SOUNDSENTRYA SOUNDSENTRY;
  8636. typedef LPSOUNDSENTRYA LPSOUNDSENTRY;
  8637. #endif // UNICODE
  8638.  
  8639. /*
  8640.  * SOUNDSENTRY dwFlags field
  8641.  */
  8642. #define SSF_SOUNDSENTRYON   0x00000001
  8643. #define SSF_AVAILABLE       0x00000002
  8644. #define SSF_INDICATOR       0x00000004
  8645.  
  8646. typedef struct tagTOGGLEKEYS
  8647. {
  8648.     UINT cbSize;
  8649.     DWORD dwFlags;
  8650. } TOGGLEKEYS, *LPTOGGLEKEYS;
  8651.  
  8652. /*
  8653.  * TOGGLEKEYS dwFlags field
  8654.  */
  8655. #define TKF_TOGGLEKEYSON    0x00000001
  8656. #define TKF_AVAILABLE       0x00000002
  8657. #define TKF_HOTKEYACTIVE    0x00000004
  8658. #define TKF_CONFIRMHOTKEY   0x00000008
  8659. #define TKF_HOTKEYSOUND     0x00000010
  8660. #define TKF_INDICATOR       0x00000020
  8661.  
  8662.  
  8663.  
  8664.  
  8665. /*
  8666.  * Set debug level
  8667.  */
  8668.  
  8669. WINUSERAPI
  8670. VOID
  8671. WINAPI
  8672. SetDebugErrorLevel(
  8673.     DWORD dwLevel
  8674.     );
  8675.  
  8676. /*
  8677.  * SetLastErrorEx() types.
  8678.  */
  8679.  
  8680. #define SLE_ERROR       0x00000001
  8681. #define SLE_MINORERROR  0x00000002
  8682. #define SLE_WARNING     0x00000003
  8683.  
  8684. WINUSERAPI
  8685. VOID
  8686. WINAPI
  8687. SetLastErrorEx(
  8688.     DWORD dwErrCode,
  8689.     DWORD dwType
  8690.     );
  8691.  
  8692.  
  8693. #ifdef __cplusplus
  8694. }
  8695. #endif  /* __cplusplus */
  8696.  
  8697. #pragma option pop
  8698. #endif /* !_WINUSER_ */
  8699.